1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

685 Commits

Author SHA1 Message Date
James Whitlock
6a6ec41809 Build fixes 2011-07-23 22:10:17 +01:00
Mike Smith
480f07a264 Typo fix. 2011-07-23 13:58:56 -07:00
Mike Smith
0df3bb2c37 Restore functions lost due to inept merging, and refactor to take advantage of them.
Address the following review feedback items:
 - use stdint types
 - avoid the use of magic numbers (define CYCCNTENA)
 - remove expository comment about sneakiness and corresponding code, replace with something simpler based on the API
 - remove commented/#if 0 code
2011-07-23 13:53:16 -07:00
Mike Smith
c3267a3b53 Remove PIOS_DELAY_TIMER definitions from configuration files, as there is no longer a delay timer to configure. 2011-07-23 13:48:40 -07:00
James Whitlock
11c568ec50 Add in a PPM input frame size tracker.
Move update of capture values to start of new frame.
Fix an issue with setting channels to invalid.
2011-07-23 01:38:51 +01:00
James Whitlock
7a58b4cceb A quick clean of ppm code to remove white space and duplicated comments 2011-07-23 01:32:57 +01:00
Mike Smith
6bc5339015 Change the pios_delay implementation to use the CPU cycle counter rather than burning a timer. 2011-07-21 23:21:26 -07:00
Stacey Sheldon
a7cce25252 usart: fix lower usarts clobbering higher ones
The break statements are clearly missing from this
switch statement.

This would lead to problems when using more than one
USART on CC.
2011-07-22 00:30:49 -04:00
James Whitlock
7ce5daef8f Clean up of PPM code in master. 2011-07-19 20:46:24 -04:00
Stacey Sheldon
8dbace5ee2 Merge branch 'rcvr_mem_reduction'
Conflicts:
	flight/PiOS/STM32F10x/link_STM32103CB_CC_Rev1_sections.ld
2011-07-17 17:14:40 -04:00
James Cotton
2da65014c7 Fix typo in servo doxygen header 2011-07-16 03:25:33 -05:00
James Cotton
b83f731c03 Remove all references to vTaskDelay in the flash code as it can run before the
FreeRTOS scheduler

Also increaes init stack size from 0x80 to 0x100
2011-07-15 18:16:16 -05:00
James Cotton
01b62cf98f Fix a typo 2011-07-15 15:30:10 -05:00
James Cotton
72e80d407c Change the magic value in the object file table. Forces all objects to be
erased since all ids are changing - this frees up memory.
2011-07-15 11:11:29 -05:00
James Cotton
d41260d54c Make the stabilization settings query correctly now by increasing the TX buffer
on the CC side to 256 bytes instead of 128 to support large objects (max object
size is 256 bytes)
2011-07-15 10:40:21 -05:00
James Cotton
3d35e249c8 Merge branch 'master' into bugfix-flight 2011-07-15 10:33:54 -05:00
Stacey Sheldon
6580462916 rcvr: specify drivers for groups of channels
Each channel was previously tracking a separate driver.
Now, channels are grouped within a channel group to save
RAM used for tracking and to better reflect how channels
are actually mapped.
2011-07-14 23:22:42 -04:00
Stacey Sheldon
442d56c1c5 linker: Add section to record unused RAM
Note that this section will be absorbed by the heap at runtime.
2011-07-14 23:22:42 -04:00
sambas
18a5465246 Bugfix: CC flexiport spektrum config
Working spektrum bind routine, depending your TX try BIND_PULSES 3,5,7,9 (5 works with DX7)
Boot process takes too long on MB so bind command misses the window (20-140ms).
2011-07-14 14:43:26 +03:00
Mathieu Rondonneau
612a439199 OP-423: simplify the MODULE_INITCALL macro and remove the ordering loops 2011-07-12 20:44:32 -07:00
James Cotton
9e94f9fee9 Fix typo from SISE to SIZE 2011-07-12 12:48:06 -05:00
James Cotton
2fe7ee40b1 Merge branch 'OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint' 2011-07-12 12:44:59 -05:00
James Cotton
59798701a2 Merge branch 'master' into bugfix-flight
Conflicts:
	flight/CopterControl/System/inc/pios_config.h
2011-07-12 11:40:47 -05:00
Mathieu Rondonneau
d38f6167e3 OP-423:
Also reduce heap has it does not fit in SRAM anymore (not with current compiler).
(that's ok since if there is more space available, it will be reclaimed).

Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint

Conflicts:
	flight/CopterControl/System/inc/pios_config.h
	flight/Modules/ManualControl/manualcontrol.c
2011-07-08 06:29:34 -07:00
Stacey Sheldon
2e8d3a9be3 clean up cut/paste cruft 2011-07-07 23:02:09 -04:00
Stacey Sheldon
1f004ee896 ppm: port PPM driver onto new CC driver layers
This is a port of a work-in-progress by Sambas onto
the new driver infrastructure needed for boot-time
configuration.

PPM and PWM still don't coexist in a build but this
is closer.
2011-07-07 22:27:57 -04:00
Stacey Sheldon
226f095a2e bootcfg: remove baudrate #defines for USARTs
The initial baud rates of each interface are now forced in the
board init code.

Any modules using USARTs should have fields added to
their settings object to allow the user to change the
baud rate from the default by using the COM layer APIs.

Developers requiring custom baud rates before the settings
objects are in place should locally edit the cfg structs
to specify the desired baud rates.
2011-07-06 23:03:54 -04:00
Mathieu Rondonneau
36f28f8037 OP-423: Fixing heap2 (puting back bytes from the post heap stack (used during init) back into the free list).
Tested this heap2 at runtime with CC and new compiler since old one (current) triggers strict alliasing error.
That's ok since strict aliasing is disabled on OP, and CC only use heap1.
2011-07-05 21:45:39 -07:00
Mathieu Rondonneau
9b9b5a1367 OP-423: remove ';' at the end of macro 2011-07-05 19:44:54 -07:00
Stacey Sheldon
dbf7574946 bootcfg: use UAVobj to control boot-time HW config
This should mark an end to the compile-time selection of HW
configurations.

Minor changes in board initialization for all platforms:
 - Most config structs are marked static to prevent badly written
   drivers from directly referring to config data.
 - Adapt to changes in .irq fields in config data.
 - Adapt to changes in USART IRQ handling.

Major changes in board initialization for CC:
 - Use HwSettings UAVObj to decide which drivers to attach to
   the "main" port and the flexi port, and select the appropriate
   device configuration data.
 - HwSettings allows choosing between Disabled, Telemetry, SBUS,
   Spektrum,GPS, and I2C for each of the two ports.
 - Use ManualControlSettings.InputMode to init/configure the
   appropriate receiver module, and register its available rx channels
   with the PIOS_RCVR layer.  Can choose between PWM, Spektrum and PPM
   at board init time.  PPM driver is broken, and SBUS will work once
   it is added to this UAVObj as an option.
 - CC build now includes code for SBUS, Spektrum and PWM receivers in
   every firmware image.

PIOS_USART driver:
 - Now handles its own low-level IRQs internally
 - If NULL upper-level IRQ handler is bound in at board init time
   then rx/tx is satisfied by internal PIOS_USART buffered IO routines
   which are (typically) attached to the COM layer.
 - If an alternate upper-level IRQ handler is bound in at board init
   then that handler is called and expected to clear down the USART
   IRQ sources.  This is used by Spektrum and SBUS drivers.

PIOS_SBUS and PIOS_SPEKTRUM drivers:
 - Improved data/API hiding
 - No longer assume they know where their config data is stored which
   allows for boot-time alternate configurations for the driver.
 - Now registers an upper-level IRQ handlerwith the USART layer to
   decouple the driver from which USART it is actually attached to.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
6415fc84a5 rtc: allow registration of callbacks on RTC tick
This separates the RTC device and interrupt handling
from the devices that rely on the tick notifications.

Drivers can now register tick notification functions
that will be called on each RTC tick event.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
740b5f1584 rcvr: convert PWM, PPM, SBUS and Spektrum to use PIOS_RCVR
All receivers now fall under the same driver API provided
by pios_rcvr.c.

This is part of a larger sequence of commits that will
switch the receiver selection over to boot time dynamic
configuration via UAVObjects.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
e77795dc28 rcvr: add generic driver API for receivers
Will be used to collapse PWM, PPM, Spektrum and SBUS so we
can choose between them at boot time instead of at compile time.
2011-07-05 22:02:47 -04:00
James Cotton
010f0255a4 OP-543: When the magic header on file system is bad at init, read multiple
times.  It's not written as cleanly as I'd like but works for wiping when magic
value changes.  Testing will reveal if this stops the lost settings.
2011-07-04 21:44:41 -05:00
Mathieu Rondonneau
f864d723dd OP-423: Cleanup and remove recently added *_BL.S startup file. 2011-07-03 18:45:02 -07:00
Mathieu Rondonneau
2daa36aad9 OP-423: Remove *_BL.S 2011-07-03 13:14:42 -07:00
Mathieu Rondonneau
b3740ec025 OP-423: Clean startup and add weak function call for stack swap. 2011-07-03 12:43:38 -07:00
Mathieu Rondonneau
fbf0b021c7 OP-423: Replace hardcoded value and get value from memory section (change from code review) 2011-06-25 20:06:33 -07:00
Mathieu Rondonneau
6683ce8570 OP-423: Make it more obvious that MODULE_TASKCREATE_ALL and MODULE_INITIALIZE_ALL are macro (for now):
- remove the ;
  - also encapsulate the macro by {} in his own scope.
2011-06-25 11:40:01 -07:00
Mathieu Rondonneau
de55c56427 OP-423: Change capital on macro to be uppercase for consistency. 2011-06-24 22:03:03 -07:00
Mathieu Rondonneau
0ff5e9a46f Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint 2011-06-21 22:02:13 -07:00
James Cotton
8976d22fad Merge remote-tracking branch 'origin/OP-159_os_sbus' 2011-06-21 17:51:22 -05:00
Mathieu Rondonneau
fc1e3f574c OP-423: Split task create and module init in order to postpone task creation once the full heap is available.
Also implement some ordering (quite ugly still) in the module init and task creation order so we can decide which module to start/init first
and which module to start/init last.
This will be replaced/adapter with the uavobject list later (once it's implemented).
reserving some space for module init and task create parameters to customize module/task creation (this will be usefull once we get the list and customization from customer).

Changes have been made for OP and CC. Tested comped with CC,OP, sim_posix.
Only ran on bench with CC for couple of minutes (code increase expected but no dropping of stack which is good).

This gives task creation at the time wherethe all heap is available.
2011-06-19 22:35:40 -07:00
Oleg Semyonov
6272210df7 sbus: some code cleanup (no functional changes) 2011-06-19 14:30:13 +03:00
Oleg Semyonov
311902f1f2 sbus: implemented S.Bus stream decoding 2011-06-18 23:19:57 +03:00
Mathieu Rondonneau
b67a38661e OP-423: merge master into that branch, resolve conflicts and test with CC and bl_CC
heap reamining is low (about 500) but stacks can be ajusted (specially the 200 bytes from system) to give the level close to 1Ko if needed.

Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint

Conflicts:
	flight/CopterControl/System/inc/FreeRTOSConfig.h
	flight/CopterControl/System/inc/pios_config.h
2011-06-17 19:04:09 -07:00
Mathieu Rondonneau
693c6bc5b0 OP-423: fix bl and bu, also fix compiler problems encountered with make all 2011-06-17 18:54:25 -07:00
Mathieu Rondonneau
65cf467ca4 OP-423: move the module initialize funtion into a specific section for OP and CC.
- create linker section for those <module>Initialize()
- later this list will incorporate parameters as well. (this probably will be more a OP feature to swap/remove/delete module on the fly.
- this is not done at compile time anymore by Makefile.
- this will allow us to have control on the module start at run-time (not implemented but build the ground for it).
- this simplify the startup (Part of code re-org).
- this change does not affect sim_posix and win32 (since they don't need that)
- ensure it's compiling for PiOS.posix
- port to PiOS.win32 but not tested (not compiled)
- tested on CC
- compile on OP.
- this free ~200 bytes.
- current avalable bytes (is we keep the same remaining bytes on the stack than before) is easily passed the 1.2Ko mark on CC with new gcc (4.5.2)
- this does not include init-reorg for each module (I still think more can be freed)
2011-06-16 22:13:19 -07:00
Oleg Semyonov
aeda61d252 usart: serial telemetry can be disabled to free USART
It was tested being merged with OP-472_CorvusCorax_CopterControl-Guidance_v3
branch, Spektrum on USART3 and GPS on USART1 and seems to work.

Currently defaults mimic original behavior, that is, if USE_SPEKTRUM
is not defined - define USE_PWM and USE_GPS. Thsi should be refactored
later to make it configurable from the Makefile.

Also it was not ported to the OP MB: it currently does not support the
S.Bus hardware and still has original behavior with the patch. But this
is one more step to dynamic configuration of ports.
2011-06-16 15:06:01 +03:00
Mathieu Rondonneau
e8cdf22427 OP-423 Port to OP: Claim (at run-time) the remaining un-used bytes (between heap and end of RAM) that are for data growth (needed at compile time).
CAREFULL: the heap section need to be the last section in RAM to avoid overwritting data...

also move address into linker (CC and OP)
2011-06-15 18:54:35 -07:00
Oleg Semyonov
d8201ec45b sbus: provide a stub based on Spektrum driver (for CC only) 2011-06-15 22:35:21 +03:00
Mathieu Rondonneau
ab4e15e9aa OP-423 also claim (at run-time) the remaining un-used bytes (between heap and end of RAM) that are for data growth (needed at compile time).
CAREFULL: the heap section need to be the last section in RAM to avoid overwritting data...

Tested with GCC 4.5.2 this gives 1K of free bytes usable in heap right away (including the 200 bytes saved just by using the new gcc).
This does not include any code re-org yet!
2011-06-14 22:13:30 -07:00
Mathieu Rondonneau
3780de8d3e OP-423 port to OP (heap2) the previous changes done in CC (heap1) (see c95b199166)
I managed to test CC with heap2 changes and the init stack claimed back to heap once scheduler starts.

the changes of this commit are OP related (just cleanup on CC side):
Arch specific stuff (in reset vector) to hide this from portable code:
     - switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
     - call the C portable function in heap2 to claim some stack back (the number to claim is taken from linker file).
     - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
     - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).
2011-06-14 20:10:53 -07:00
Mathieu Rondonneau
c95b199166 OP-423 do the arch specific stuff (in reset vector) to hide this from portable code:
- switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
 - call the C portable function in heap1 to claim some stack back (the number to claim is taken from linker file).
 - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
 - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).

The part missing for this part is the weak attribute for the function in heap1.c so that we don't have to update everything with empty stub.
I think the weak atrribute for C function called in assembly is arch dependent so I am not sure if this is possible (will look into it, maybe somebody outthere nows).
Right now, it's heap1 dependent and won't work with heap2. I will clean that up the next couple of days.

I did some test and it looks good.
this is without init code re-organization so we don't free as much as we will be it's good starts.

This compile with sim_posix (since it does not affect portable code) so this is really clean.
I only tested this with CC. I will port it for OP when I will work on heap2.
2011-06-13 21:49:17 -07:00
Mathieu Rondonneau
1f54e32ea9 OP-423 also add changes to OP. (I can not test it because I don't have a board so only compile test) 2011-06-13 17:10:14 -07:00
James Cotton
404c026188 Patch from Zippe to use cycle timer for CPU monitoring. 2011-06-13 00:24:30 -05:00
Mathieu Rondonneau
7598e898fa OP-423 Step-1: split system stack and implement water mark for IRQstack:
- use IRQStack for ISRs (at begening of SRAM) (let's call it the irq stack)
- use end of heap for stack needed during initialization (let's call it the init stack).
- the systemStats in GCS indicate the remaining bytes in the IRQ stack (this is realy usefull to monitor our (nested) IRQs.

This is the base ground to provide as much memory as possible available at task creation time.

Next step is to re-organize the initialization in order to move all the init out of the thread's stacks onto the init stack.
This will provide as much memory as possible available at task creation time.
Basically the stack during initialization will be destroyed once the scheduler starts and dynamic alloc are made (since the init stack is at the end of the heap). We will need to make sure we don't clobber the heap during initialization otherwise this will lead to stack corruption.
2011-06-12 20:23:00 -07:00
James Cotton
0f5fe54329 FlashFS: Should clear the 0 sector when wiping flash chip, not 10 bytes in. 2011-06-11 22:31:51 -05:00
James Cotton
4f47c06547 Merge branch 'saving_crc' into bugfix-flight 2011-06-05 15:37:44 -05:00
James Cotton
0a56129b35 OP-452: Made the CRC calculation run in chunks to balance efficiency and ram
usage, because Stac caught me being lazy :)
2011-06-05 09:05:59 -05:00
James Cotton
599483d5ac OP-152: Save CRC for object and header into flash and only load object if CRC
matches.  Read the flash first bytewise to compute CRC instead of buffering
which is more RAM efficient but very inefficient as it sets up many one byte
SPI transfers.

Also incremented the filesystem magic flag to trigger an automatic flash wipe
on this upgrade.
2011-06-04 18:36:38 -05:00
James Cotton
3e5d02cbaf OP-152: Abstract the CRC code out of uavtalk to allow it to be reused (PT -
feel free to test moving this to the hardware CRC unit)
2011-06-04 18:36:26 -05:00
dankers
3013a092d9 Merge branch 'OP-519_Mathieu_Upgrade_FreeRTOS' into bugfix-flight 2011-06-04 16:42:15 +10:00
Mathieu Rondonneau
6e64a546df Remove un-used code 2011-06-02 20:21:26 -07:00
Mathieu Rondonneau
071a684248 OP-519 upgrade to FreeRTOS-7.0.1
- only affect flight/PiOS (no change for posix and win32)
- tested on recent master (some runtime on CC with GCS)
- the new timer feature is not compiled-in since we don't use it yet.
- NO TEST FLIGHT
2011-06-01 21:46:28 -07:00
Oleg Semyonov
f770870af7 Merge branch 'bugfix-flight' 2011-06-01 14:53:31 +03:00
Oleg Semyonov
6e418735cf OP-509: fix for ld symbol reference (also fixes build with 4.5.2 gcc) 2011-06-01 00:31:27 +03:00
James Cotton
524cdf7743 OP-378: Start of IMU3000 fifo reading code 2011-05-31 01:51:05 -05:00
James Cotton
b6a8293f69 OP-378: Get BMA180 interrupt working. Data gets pushed onto a fifo that is
pulled from in the INS code.
2011-05-30 03:40:51 -05:00
sambas
17fb31a7fa Spektrum rtc supervisor working, tested on CC and all outputs are activated. Needs review and testing before merge. 2011-05-29 14:52:22 +03:00
sambas
86d02e2d34 Merge branch 'master' of ssh://git.openpilot.org/OpenPilot into spektrum_rtc_supervisor 2011-05-29 10:40:17 +03:00
Stacey Sheldon
ac0eb3a5c7 Merge remote branch 'origin/stac_build-opf-image' 2011-05-26 21:29:53 -04:00
James Cotton
66b85acebd Merge branch 'bugfix-flight' 2011-05-26 20:07:58 -05:00
James Cotton
ca2205d35f OP-378: Tweak INS stack definition to avoid faults 2011-05-26 16:02:15 -05:00
James Cotton
9ede84680e OP-378: Start working on IRQ driven BMA180 reading and also fixed the mag order 2011-05-26 13:57:41 -05:00
James Cotton
6e186bab35 Merge branch 'bugfix-flight' into OP-378_James_INS 2011-05-26 12:19:35 -05:00
James Cotton
0a60c5b57c Merge branch 'master' into OP-378_James_INS 2011-05-26 12:19:30 -05:00
James Cotton
4bc763dafc Extend PiOS DELAY to allow querying the time value in uS 2011-05-26 12:19:04 -05:00
James Cotton
74b9c58f39 Make sensors return data as int16 array instead of struct 2011-05-26 02:49:25 -05:00
James Cotton
20775e806c Merge branch 'OP-378_James_INS' of ssh://git.openpilot.org/OpenPilot into OP-378_James_INS 2011-05-25 22:19:31 -05:00
Stacey Sheldon
8bd08e381a build: add support for EE bank on pipx boards
The pipxtreme boards use a sector of the on-board flash
for configuration storage.  Adjust the memory maps to
reflect this.

The board_info_blob is also extended to include the EE
bank definitions.  This should be used by the pipxtreme
firmware rather than determining it based on chip size.
2011-05-24 01:10:40 -04:00
Stacey Sheldon
9973fda23b build: define bootloader and firmware bank spans
The board-info.mk files now define the start and size
of the bootloader and the firmware banks.
2011-05-24 01:03:01 -04:00
Stacey Sheldon
504fe7a664 dfu: fix typo WRITABLA -> WRITABLE 2011-05-24 00:58:10 -04:00
Stacey Sheldon
96827eecff build: Make all flight sw use pios_board_info_blob
Now that every bootloader build has a board info blob,
make all fw and bl images use it.

The following MACROS are removed:
  BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION,
  START_OF_USER_CODE, HW_TYPE

These values are now ONLY available from the bootloader
flash via the pios_board_info_blob symbol.  These values
must not be #defined or otherwise hard-coded into the
firmware in any way.  The bootloader flash is the only
valid source for this information.

NOTE: To ensure that we have an upgrade path from an
      old bootloader (without board_info_blob) to a
      new bootloader (with board_info_blob), it is
      essential that the bu_* targets do not depend
      on (or validate) the board_info_blob being present
      in the bootloader flash.
2011-05-24 00:58:10 -04:00
David Carlson
38d416cf92 Fix Y/Z axis mixup in self-test procedure (currently not used) 2011-05-23 20:53:15 -07:00
Stacey Sheldon
2d47427b05 link: Use alternate declaration of pios_board_info_blob
Make use of a shorter notation to allow the linker to provide
the correct address for pios_board_info_blob.
2011-05-23 18:21:42 -04:00
Stacey Sheldon
6e406c0232 build: remove all remaining use of -DUSE_BOOTLOADER
The USE_BOOTLOADER compile flag was only being used
to determine where the ISR vector table was located.

Provide this explicitly from the linker since it knows
exactly where it is putting the ISR vector table.
2011-05-23 18:21:42 -04:00
Stacey Sheldon
0a67730d0f build: refactor fw, bl and bu rules
- New macros for fw, bl and bu rules in top-level make
- Per-board info factored into make/board/*/board-info.mk
- Per-board info now shared btw. fw, bl and blupd for each board
   - BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION, HW_TYPE
   - MCU, CHIP, BOARD, MODEL, MODEL_SUFFIX
   - START_OF_BL_CODE, START_OF_FW_CODE
- blupd_* goals renamed to bu_*
- all_blupd goal renamed to all_bu
- firmware goals renamed to fw_*, board name goals are preserved
- bu_*_program now writes updater to correct address for all boards
- BL updater firmware builds now produce .opf format including
  version info blob.
- BL updater firmware name now includes board name.
- INS makefile brought up to date w.r.t. linker scripts
2011-05-23 18:21:42 -04:00
James Cotton
50161b4ad8 OP-378: Continue updating BMA180 sensor driver. 2011-05-20 16:38:53 -05:00
James Cotton
5d78a68bee OP-378: Got BMA180 working. 2011-05-19 11:36:43 -05:00
James Cotton
3093d26cf4 OP-378: Update BMP085 driver for convention that 0 is success, < 0 is failure 2011-05-19 11:36:32 -05:00
James Cotton
750097ea73 OP-378: Small changes to get drivers working again. Fix I2C port for IMU3000
and change convention so that 0 is success, < 0 is error.
2011-05-18 23:35:45 -05:00
James Cotton
ab3127a0ea OP-378 Update the INS Makefile for the new file formats 2011-05-18 14:39:38 -05:00
James Cotton
b7f25ea5d8 OP-378: Get startup script for HD parts working for INS 2011-05-18 13:41:31 -05:00
James Cotton
81b7fb6185 Merge branch 'master' into OP-378_James_INS 2011-05-18 12:50:29 -05:00
James Cotton
dd1e10a15d PiOS/Spektrum: Start swapping to using RTC and calls to PIOS_Spektrum_Get() to
monitor when call Spektrum watchdog
2011-05-18 01:46:00 -05:00
James Cotton
bdf862a712 PIOS/RTC: Add functions to get the rate. Also changed Start to Init to be more
consistent with pios.
2011-05-18 01:45:21 -05:00
Stacey Sheldon
575010169a build: add pios_board_info_blob struct to bootloader flash image
The board info blob is stored in the last 128 bytes of the
bootloader's flash bank.  You can access this data from the
application firmware like this:
  #include <pios_board_info.h>

  if (pios_board_info_blob.magic == PIOS_BOARD_INFO_BLOB_MAGIC) {
    /* Check some other fields */
  }

DO NOT link pios_board_info.c into your application firmware.
Only bootloaders should provide the content for the board info
structure.  The application firmware is only a user of the data.
2011-05-16 08:30:30 -04:00
James Cotton
feb9c02780 OP-216: Small typo in flashfs code (thanks Zippe) 2011-05-15 00:18:15 -05:00
James Cotton
d312e876c4 OP-216: Some small bugs where things were stored 2011-05-14 16:11:30 -05:00
James Cotton
c689d97961 OP-216: Improved error handling 2011-05-14 14:28:11 -05:00
James Cotton
0438f5cf66 OP-216: Check for existence of file table in flash and wipe sector and create
it if missing.
2011-05-14 14:23:23 -05:00
James Cotton
2087441006 OP-216: Make the object manager use new flash fs for objects 2011-05-14 14:23:02 -05:00
James Cotton
7e6e7bb391 OP-499 OP-216: Simple list of objects saved in flash to prevent objId
collision.  Note, this will wipe ALL your settings.
2011-05-14 14:05:02 -05:00
Stacey Sheldon
29ec2f198b build: convert all app loads to require bootloaders
This change is made up of a number of tightly coupled
changes:
 - Deprecate the use of the USE_BOOTLOADER command-line
   option.  It is now hard-coded in each Makefile.
   Overriding it on the command line is not allowed.
 - Split apart the memory declaration and the section
   declaration in all linker files (*_memory.ld and
   *_sections.ld).
 - Describe the split between bootloader and app sections
   of flash in each board's _memory.ld file.
 - Change program target to selectively erase flash so
   that the installed bootloader is preserved across even
   JTAG programming operations.
 - All elf files are built with debug symbols and are not
   stripped.  This should help debugging with gdb.  The
   images programmed on the boards are all .bin files now
   which do not include symbols.
2011-05-08 12:40:29 -04:00
Stacey Sheldon
18ea93119f build: Add support for BL_Updaters to top-level makefile
New targets:
 - make blupd_all_clean
 - make blupd_all
 - make blupd_openpilot
 - make blupd_ahrs
 - make blupd_coptercontrol
 - make blupd_pipxtreme

These targets are also included in the 'all_flight' target.
2011-05-08 12:40:28 -04:00
Stacey Sheldon
2301600f11 Make missing definitions for essential macros more obvious 2011-05-07 18:05:50 -04:00
sambas
d61f3d4d94 Merge branch 'OP-378_CheBuzz_INS' of ssh://git.openpilot.org/OpenPilot into OP-378_CheBuzz_INS 2011-05-07 18:26:12 +03:00
Corvus Corax
5d952f81e3 PIOS: BL_HELPER: refactored function names 2011-04-23 21:11:17 +02:00
Corvus Corax
150464344d BL_HELPER: call CRC_Ini() from within CRC check function 2011-04-23 20:55:21 +02:00
Corvus Corax
357bc369db PIOS: Bootloader Helper functions should sit in HAL, not duplicated in every single architecture. 2011-04-23 19:40:41 +02:00
Corvus Corax
192e31986d PIOS, Modules/FirmwareIAP: Use correct HAL for CPU serial 2011-04-23 18:30:32 +02:00
David Buzz Carlson
876ca3044c Added EKF code. Most of this was bulk copy and paste from the AHRS, so a lot of verification needs to take place. Grabbing sensor data remains untested. 2011-04-20 03:37:50 -07:00
chebuzz
06443b4281 OP-378 - OP/INS - Add initial support for INS. HMC5883, BMP085, BMA180, IMU300 all added. Throrough verification has not been done on any of them. main() simply calls self-test functions on all of the hardware.
AHRS_comms still needs to be implemented.  INS/GPS functionality still needs to be implemented.  Double-check of the new drivers still needs to be done.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3162 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 12:46:39 +00:00
chebuzz
7fcde2f248 OP-377 PiOS/BMP085 Update BMP085 driver to be FreeRTOS agnostic
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3161 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 09:53:04 +00:00
chebuzz
195e93c0d6 OP-377 PiOS/BMP085 - Update BMP085 driver to be FreeRTOS agnostic. This is required since new INS does not run FreeRTOS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3160 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 09:46:23 +00:00
sambas
3b9e762b69 OP-22 Flight/PiOS: Spektrum bugfix, for other than DX7
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3154 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-11 13:42:32 +00:00
sambas
dabc33c71c OP-22 Flight/PiOS: fix for 11ms framerate, Spektrum supervisor timer must have atleast one interrupt between frames
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3134 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-09 14:51:39 +00:00
sambas
cdfbf8614c OP-22 Flight/PiOS: Spektrum parser handles all known TXs, or atleast should. Test it well before sending aircraft to the sky.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3133 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-09 14:17:23 +00:00
pip
4fab429f50 Corrected the #ifdef line (line 26/27), it was "#ifndef STM32103CB_AHRS_H_", it's now "#ifndef STM32103CB_CC_H_"
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3022 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-10 20:22:20 +00:00
FredericG
fc18f1cb36 OP-326 Long I2C messages starve the other drivers
We where hammered on the head with interrupts that the driver does not need, not allowing the ISRs of other drivers to run 

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3018 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-09 17:12:18 +00:00
FredericG
4c51e80b5b OP-340 I2C NACK causes next transfers to fail.
Needed to clear the NACK flag in the ISR, or the next transfers seem to get a nack too because the IRQ comes back

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3017 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-09 16:58:37 +00:00
FredericG
f6a2584f12 No code change; commented debug-code
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3016 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-09 16:52:09 +00:00
edouard
aa097ec400 OP-339 Update USB descriptors on CopterControl and OpenPilot to reflect the new convention.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3015 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-09 07:21:01 +00:00
sambas
b240915d05 PPM driver cleanup
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3010 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:52:50 +00:00
pip
0d389c4d34 Forgot to comment out serial port debugging option .. sorry - again
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3009 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:32:16 +00:00
pip
48cecfaacd Forgot to commit this file - sorry
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3008 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:29:48 +00:00
sambas
0eeacb44bd PPM driver for OP, first test
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3007 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:08:13 +00:00
FredericG
6d0679b9e9 Small fix to PIOS_DEBUG_PinValue8Bit(), was also influencing other IO pins
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2975 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-05 12:53:52 +00:00
FredericG
35475820ad 2 new PIOS_DEBUG functions to output a value on the debug-pins. In its current implementation it will probably not work on CC....
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2971 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-05 09:23:57 +00:00
peabody124
ec29920a8d OP-315: Clean up RTC calls into a separate function. Unfortunately still need
to add function headers into portmacro.h

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2942 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:38 +00:00
peabody124
3e2c542eef OP-315 Use RTC at 65 khz as time base for task switching
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2941 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:34 +00:00
peabody124
267efe0b88 OP-315: Patch to FreeRTOS port to allow querying the run time for tasks. This
will need to be forward ported (and ideally pushed up stream) for FreeRTOS
updates

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2939 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:22 +00:00
sambas
d9ad0e9a8f OP-22 Flight/PiOS: Spektrum hacks, doubled supervisor timer and ?loss? counter to the channel8 value
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2907 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-27 19:03:58 +00:00
pip
62e510a696 Set unused/unconnected pins as outputs.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2875 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-24 17:31:24 +00:00
pip
578b779a76 Fixed PPM compile errors - you can now compile for PPM input if desired.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2818 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 13:41:19 +00:00
sambas
8d6f320fca Handle I2C defines better, needed in CC for now
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2815 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 07:14:02 +00:00
stac
bbb3882826 bl_openpilot: bind to new COM, USART and SPI drivers
- Removed all unnecessary device instances and their cfg's.
  - SPI to SD card
  - I2C
  - Aux USART
- Moved SPI baudrate setting into cfg rather than init func.
- Abstracted forcing slave select under OPAHRS API.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2786 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-14 01:17:32 +00:00
sambas
f3bce1705b OP-22 Flight/PiOS: Spektrum fix, OP tested on ground not flown yet, CC not tested.
pios_rcinput.[ch] outdated

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2775 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-13 13:10:02 +00:00
stac
66a9d53d0a hwinit: Convert I2C driver to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2773 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:54 +00:00
stac
3fda65c5d3 hwinit: Convert SPI drivers to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2772 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:50 +00:00
stac
841b0d3d6d hwinit: Convert COM and USART to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2771 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:43 +00:00
peabody124
9ed0882df9 PiOS/USART: Apply same fix as Spektrum to force read of DR whenever there is an
error flag set

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2760 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:52 +00:00
peabody124
7e78e8af04 CC-21 PiOS/Spektrum: Prevent condition that can tie up USART interrupt and locks up
CC.  Must always read the DR to clear the error flags.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2759 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:49 +00:00
peabody124
a3ba9c3781 CC-21 Make it possible to enable Spektrum on CC, although it eats up S6 in
order to free a timer.  Mode PIOS_DELAY (not working cleanly) to TIM3 because
Spektrum resets TIM2 count.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2758 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:45 +00:00
peabody124
03fb82ad0a CC Attitude: Change when AttitudeRaw is set to end of attitude estimation,
because this is what is determines when the Stabilization code executes.
Because we aren't oversampling gyros relative to the PID in CC we should set
the attitude first (computational time to do so is negligible).

Also change update rate to 500 Hz.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2750 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:18 +00:00
pip
6559615ef8 Made quite a few constants/#defines capitals (previously lower case)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2743 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-06 10:55:08 +00:00
peabody124
56d4d54a97 CC: Increase the memory for the modules after removing PriTxTask from CC and
also increase the telem queue to decrease event errors (can be reverted later if
we need the memory back)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2730 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-05 10:52:59 +00:00
peabody124
f97d853c80 Make the PriTx queue optional which saves 700 bytes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2729 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-05 10:52:52 +00:00
peabody124
fedadb1275 CC-8: Move the queue registration into the ADC PIOS driver to allow other
functions to use it easily

Conflicts:

	flight/Modules/Attitude/attitude.c

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2707 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-03 02:42:43 +00:00
peabody124
cf2e9fb349 Memory: Also allow overriding Stabilization stack size
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2690 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-02 08:57:34 +00:00
peabody124
b1e4b65f3d CC-1 Bigger oversampling window for CC sensor data
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2667 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:18:31 +00:00
peabody124
97acaa2402 CC-15 Gets settings saved to flash chip on CC using crude sector based storage.
Sector based on Object ID so could overlap :-(.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2662 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:18:12 +00:00
peabody124
ea91042f38 CC-6 Fixed bug in flash read write addresses
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2661 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:18:08 +00:00
peabody124
e27c9c0b7a CC-6 Rename Flash function to not be all upper case consistent with other PIOS
functions

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2660 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:18:04 +00:00
peabody124
1d2ad6e9cb Telemetry: Move the telem stack size to the board definition file since CC
needs less

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2659 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:17:59 +00:00
peabody124
c9207b3754 CC-14 PIOS/Servo: Set more than two bank speeds
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2658 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:17:55 +00:00
peabody124
063c58e7c0 CC-12 Enable Watchdog on CC
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2653 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:17:32 +00:00
peabody124
037a63ee1d CC-1 CC-8 Cache the oversampled gyro value and use that to get rid of glitches.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2652 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:17:27 +00:00
stac
880a68a788 uavobj: Convert bootloader-compatible builds to autogen init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2633 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-31 00:57:24 +00:00
stac
b5426e09d0 uavobj: Convert CC over to use autogenerated uavobjinit
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2631 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-30 22:46:51 +00:00
stac
083e2b01a9 uavobject: Use linker to produce uavobj initcalls
The UAVObject initcall list is now automatically
generated at link time based on the exact set of
UAVObjects linked into the firmware image.

This will allow any subset of UAVObjects to be
used in any firmware image.

The uavobj_initcall() macro automatically adds the
marked function's address into the .initcalluavobj.init
ELF section.

The UAVObjectsInitializeAll() function now simply
iterates over the functions listed in the
.initcalluavobj.init section and calls them.

You can see the contents of this section in the ELF file
like this:
  ./tools/arm-2009q3/bin/arm-none-eabi-objdump \
      --syms -j .initcalluavobj.init \
      ./build/openpilot/OpenPilot.elf

This is fundamentally the same mechanism that the Linux
kernel uses to initialize the specific set of components
that the user has selected in their kernel configuration.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2630 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-30 22:46:48 +00:00
pip
5daf6fd1c0 Added PIP_DUMP_RAW option in ahrs.c and brought back public acces to function PIOS_ADC_GetOverSampling(void).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2623 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-29 15:59:35 +00:00
sambas
ba5ebb6b13 OP-303 PIOS/Sonar: preliminary support for HCSR04 ultrasound altimeter module, tested and working :)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2610 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 19:21:22 +00:00
sambas
195b63b6bb OP-22 PIOS/Spektrum: Made spektrum input driver, NOT YET TESTED!!!, also preliminary support for CC, sync/supv timer not yet fixed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2602 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 09:25:30 +00:00
edouard
df0b5f9b6c CC-13 CopterControl bootloader first pass. Does not talk on USB for some reason, but starts.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2601 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-27 22:33:13 +00:00
peabody124
99eb1a89f9 CC-5 PIOS/Servo: CC default servo position was 2000 from testing. HUGE SAFETY
ERROR

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2593 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-26 01:25:29 +00:00
peabody124
c759253b77 CC-6 Flash chip working to read ID. Also tweaked how the semaphore for the SPI
bus is used to be a bit safer.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2591 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-25 17:46:27 +00:00
peabody124
00a3e82c70 CC-6 PIOS/SPI: Add semaphore to SPI device structure that can be used to ensure
only one CS line is asserted.  No checks are enforced on this by the SPI code
as I cant see a clean way of it being aware of the CS lines.  We could add
another CS mode those which is driver managed per transfer and has a GPIO i
line for each device.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2579 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:17 +00:00
peabody124
d2f3e0d379 CC-6 Initial code for the flash chip on CC
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2578 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:14 +00:00
peabody124
d4b4a6ca37 CC-3 Modules/CCAttitude: Add oversamplign to the accel data
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2576 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:08 +00:00
peabody124
21e3441f00 CC-3 Set gyro to downsample 10x to 250 Hz
Conflicts:

	flight/CopterControl/System/inc/FreeRTOSConfig.h

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2575 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:05 +00:00
peabody124
23599ee59f CC: Set the buffer size of USART smaller and register teh AHRSSettings
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2573 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:59 +00:00
peabody124
2881370eab OP-291 PIOS/Servo: Refer to channels by TIM_Channel_x to be consistent with PWM
system

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2571 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:54 +00:00
peabody124
99fcd089d4 OP-291 PIOS/Servo: Make the remapping of timers a part of the driver structure
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2569 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:48 +00:00
peabody124
da96ce15b9 OP-256 PIOS/PWM: Converting PWM input to use standard driver structure.
Beginning of unifying the input types into PIOS_RECEIVER.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2568 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:45 +00:00
peabody124
01b09668aa OP-291 PIOS/Servo: Dont need to power up GPIOA/GPIOB in servo since done in sys
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2567 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:41 +00:00
peabody124
99f2f3c68b OP-291 CC Servo configuration: Gets S5 and S6 working
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2566 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:38 +00:00
peabody124
108ea8c959 OP-295 Get CC pin mappings consistent for using the temperature sensor
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2565 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:34 +00:00
peabody124
607cdcac21 Upgrade FreeRTOS to the latest version (6.1.1) which allows compiling with -Os
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2562 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:26 +00:00
FredericG
70f11543e0 Fixed debugging via Servo PWM pins
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2544 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-23 18:11:47 +00:00
peabody124
65e02eeb25 OP-293 PIOS/ADC: Fixed issue with DMA engine and odd numbers of channels not
accounting for the fact they are transferred in pairs when using ADC2

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2510 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 17:18:20 +00:00
peabody124
2d9f7f32d1 OP-291 PiOS/Servo: Converting output to use driver system
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2499 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 03:40:21 +00:00
peabody124
cf17569de7 CC-1 Modules/CCAtttitude: Calling the ADXL345 library and getting the accel and
gyro data into attitude raw.  Hardcoded calibration for now.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2474 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 08:45:40 +00:00
peabody124
18deba48c1 CC-6 PIOS/ADXL345: Helper functions for the ADXL345 chip. Need to add
semaphores for sharing the bus between the flash chip and this though.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2473 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 08:45:37 +00:00
peabody124
21b4e55029 OP-14 OP-16: I2C Improvements
1) Added nack counter monitoring
2) Made timeout for getting semaphore in I2C user space code use the one from
driver and record timeouts.  This does not influence timeouts in the non
FreeRTOS case
3) Remove case block from the error handler so that all bus errors reset the
i2c interface

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2469 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 02:11:12 +00:00
peabody124
0e441a20f3 OP-14 OP-16 I2C: When sending STOP signal after NAK, mask interrupts first
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2468 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 02:11:08 +00:00
peabody124
0d567f4e4b OP-14 I2C: Don't log a NAK as an error and also after NAKs seem to get an event
from the stop bit

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2466 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 02:11:02 +00:00
peabody124
31919241b8 OP-14 I2C: Adding new event to the ignore list
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2465 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 02:10:59 +00:00
peabody124
68536d2fd1 OP-14 I2C: Throw away 0 event in error handler
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2464 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 02:10:56 +00:00
peabody124
c2bdf624e8 OP-269 PIOS/ADC: Previous ADC driver update changed the PCLK2 divider for all
projects which messed up a timer on OP and serial on PipX.  Now this is only
changed for AHRS.  Ideally wouldn't even change for that but then ADC runs too
fast and we get a lot more CRC errors for dealing with all that data.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2459 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 23:00:48 +00:00
edouard
b3ca037308 OP-277 Update all files to use a BOARD_TYPE and BOARD_REVISION scheme through the whole codebase.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2458 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 20:41:55 +00:00
peabody124
04a00c7327 OP-269 PIOS/ADC: Change the initialization code to work well when changing
oversampling

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2452 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 16:02:53 +00:00
peabody124
ad7a6e6071 OP-269 PIOS/ADC: Only enable the half and full conversion flag for the double
buffering

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2451 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 16:02:50 +00:00
peabody124
0259b6d1f1 OP-269 PIOS/ADC: First part of conversion to driver structures
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2444 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:39 +00:00
peabody124
ab75e8117f OP-265 CC: Getting GPIO lines working
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2443 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:34 +00:00
peabody124
81b0c3fdb6 OP-269 PiOS/ADC: Moved AHRS ADC code to PiOS and made all the projects use it
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2440 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:22 +00:00
zedamota
ad0b3e911d OP-268/PipX Bootloader - Changed Timers for MD device, auto memory space fetching (as per people request ;)). Stripped unused functions to reduce size.
TESTED WORKS.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2431 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 15:33:24 +00:00
peabody124
ad7a4cded0 OP-265 PIOS/USB: Put USB buffer size in the board file
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2428 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 02:15:19 +00:00
peabody124
94ff276522 OP-265 CC: Tweaking objects included and the memory requirements
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2426 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:49 +00:00