Brian Webb
346ae1bc6e
Removed crc from PipXtreme build.
2012-03-18 10:29:28 -07:00
Brian Webb
620e862022
Moved unused crc.c/h back to PipXtreme directory.
2012-03-18 10:26:47 -07:00
Brian Webb
ecdf150946
Moved RFM22B code from PipXtreme to pios_rfm22b.c driver. The radio is now passing data.
2012-03-18 10:22:05 -07:00
Brian Webb
41c68a6f6b
Updates to PipX configration.
2012-03-15 19:51:46 -07:00
Brian Webb
78b622a8d8
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme
2012-03-15 19:31:18 -07:00
Brian Webb
b34b849453
Added start at a modified PipX packet handler.
2012-03-15 19:29:54 -07:00
James Cotton
a319a6b14c
Flags to disable mag/baro init
2012-03-14 22:35:09 -05:00
James Cotton
0d42303d37
Fix some compilation errors/warnings in attitude.c
2012-03-11 16:30:18 -05:00
James Cotton
c8d1534b87
Convert inline functions to static, let the compiler figure it out. Also some
...
formatting since code was probably written with tabstop = 2 :)
2012-03-11 13:18:08 -05:00
James Cotton
bbbca319d8
Merge commit 'c4df0c0ceff8ba985bb20d815f27910b9e59d992' into revolution
2012-03-11 13:14:06 -05:00
Alessio Morale
c4df0c0cef
Support for port remapping on serial ports
...
Support for receiver configuration (PPM, PWM and DSM)
There are still problems with Flexi port (not sure if related to a problem with my board) and Uart/SBUS that has the input always inverted.
2012-03-11 18:38:49 +01:00
Stacey Sheldon
3782cdc58e
bu: drop CC and PipX from BU targets since they don't build
...
The CC and PipX bootloader updater (BU) builds don't currently
work due to some recent changes in how LEDs are handled.
Remove them from the default BU targets so that the all_flight
target can build clean again.
Also fix a linker warning in OP build.
2012-03-10 20:41:15 -05:00
Stacey Sheldon
6038bfcb40
revo servo: swap servo pins 3 and 4 definitions to match schematic
...
Note non-standard pin numbering on JP3 on the schematic.
2012-03-10 15:06:21 -05:00
James Cotton
820ca6a970
Initialize loop variable OUTSIDE loop so that baro is used still for altitude
...
hold.
2012-03-10 11:28:51 -06:00
James Cotton
f4705551b6
Update task info to cover the AltitudeHold module
2012-03-10 11:14:30 -06:00
James Cotton
690f1b5f29
Enable camera stabilization
2012-03-08 01:37:34 -06:00
Stacey Sheldon
3210bd3f9c
f4 usb_dcd: disable FIFO empty IRQ while waiting for tx completion
...
CPU was being hammered with FIFO empty IRQs if we queued data but
the host wasn't actively draining the FIFO.
This was entirely unexpected so this hack should probably be
removed once we can figure out why this was happening.
This is almost certainly hiding some other issue.
2012-03-07 20:36:37 -05:00
Stacey Sheldon
c4bd286739
f4 usb_hid: track whether we have buffers queued on endpoints
...
Make sure we don't clobber our endpoint configuration by
double configuring an Rx or Tx buffer against it. Wait for
the completion of the previous operation before allowing
endpoint configuration again.
2012-03-07 20:36:36 -05:00
Brian Webb
d73895de7d
Working PipX com relay.
2012-03-07 18:05:42 -07:00
Stacey Sheldon
65fc6104e6
f4 usb_hid: ignore upper layers if USB IF not yet enabled
...
Upper (COM) layer was calling down into the HID layer before
the HID interface had been enabled. This was leading to
interacting with the endpoint Rx and Tx FIFOs prior to init.
The FIFO config was then being clobbered when we the USB IF
was eventually enabled.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
1f37806eab
f4 usb_hid: fix typo in EP IN registration call
...
Code was using the size of the Rx buffer instead of the Tx
buffer when registering. Buffers are currently the same
size so wasn't causing any issues.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
bc3ee6209c
f4 usbhook: drop in/out bit from EP numbers before using as index
...
USBHOOK endpoint callback arrays should not be indexed with the
0x80 (in/out) bit set. Oops.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
6832a62872
f4 bl_helper: clear all flash errors as we unlock the flash
...
Error flags being set were causing flash erase operations to
fail. Not sure why these flags were set though so this might
be hiding some other problem.
2012-03-07 19:53:18 -05:00
Stacey Sheldon
4ea1156e7b
f4 bl_helper: teach bl_helper about f4 flash sector map
2012-03-07 19:53:17 -05:00
Stacey Sheldon
d1d123e4f6
revo bl: turn on USB and add support for OP DFU protocol
2012-03-07 19:53:17 -05:00
Stacey Sheldon
b8fcbad297
revo bl: remove unneeded code from revo BL
...
Clean up BL source tree and makefile.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
c854c3f4a4
usbhook: add support in API for deactivating USB
2012-03-07 19:53:17 -05:00
Stacey Sheldon
cb9c3a9b7e
usbhook: delete dead code
...
Remove old code left-over from porting from F1 to F4.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
e2ab662b5d
sysclk: pass in correct definition for HSE_VALUE
...
The code in RCC_GetClocksFreq() uses HSE_VALUE to determine
the tick rate of the SYSCLK. This in turn is used by the
code in PIOS_DELAY_* to compute delays.
ST Library defaults this to 25MHz for the F4. Our board
actually has an 8MHz oscillator so delays were way off.
Mostly affects the bootloaders since most FW code uses RTOS
delays rather than busy-waiting using PIOS_DELAY_*.
2012-03-07 19:52:54 -05:00
Stacey Sheldon
fdf54ab86c
hid: fix response to HID descriptor
...
HID driver was incorrectly giving back the HID interface
descriptor when asked for the HID descriptor. This should
let OP boards interact better with generic HID layer drivers
and also gives us nicer output in lsusb once the HID descriptor
is read.
2012-03-07 19:52:54 -05:00
Brian Webb
444150269a
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme
2012-03-05 18:22:08 -07:00
James Cotton
61d59828dc
Disable the new features if not revolution and set an error flag. Fixes
...
compilation errors.
2012-03-05 00:24:11 -06:00
Alessio Morale
637af911ef
Merge remote-tracking branch 'origin/james/revolution' into amorale/revolution
2012-03-04 12:31:13 +01:00
James Cotton
7961aba83c
Clean up a few more compiler warnings
...
Conflicts:
flight/PiOS/Common/pios_ms5611.c
2012-03-03 13:32:56 -06:00
James Cotton
91a226fc12
Sometimes the mag stops updating so kickstart it
2012-03-03 13:31:46 -06:00
James Cotton
bc8b72623e
Get rid of some unused variables
2012-03-03 11:54:09 -06:00
James Cotton
b3f620af7c
Merge remote-tracking branch 'revo/stac/openocd' into revolution
2012-03-03 11:52:09 -06:00
James Cotton
f20e5da9ed
Merge branch 'next' into revolution
...
Conflicts:
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configrevowidget.h
ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp
2012-03-03 11:41:41 -06:00
Stacey Sheldon
0684a42fac
build: use board-specific JTAG interface for openocd
...
Removes hard-coding of JTAG interface config in the
<board>_program make macros.
This allows the use of STLINKv2 for F4 boards while
continuing to use the FOSS JTAG revB on F1 boards.
2012-03-03 08:43:01 -05:00
Stacey Sheldon
d78c5d2a9a
openocd: reenable flash commands on f4 boards
2012-03-03 08:43:01 -05:00
Stacey Sheldon
c0c38609ec
openocd: move to newer openocd (dec6b913)
...
This update fixes flash writing on F4 chips
2012-03-03 08:43:01 -05:00
Alessio Morale
226cd09a13
Merge branch 'james/revolution' into amorale/revolution
2012-03-02 21:24:56 +01:00
James Cotton
e3df261213
Merge branch 'stac/revo-usb' into revolution
...
Conflicts:
flight/Revolution/System/pios_board.c
2012-03-02 13:00:13 -06:00
James Cotton
72a93dbae5
Fix from PT for OSX/Windows F4 USB HID to send the full report size even if not
...
all used.
2012-03-02 11:11:36 -06:00
Alessio Morale
e8880d7271
Removed duplicate InitClock for tim_4
2012-03-02 00:55:50 +01:00
Alessio Morale
691e8760bc
Updated OpenPilotOSX.xcodeproj to include Flight as a reference to the actual folder
2012-02-29 23:13:02 +01:00
Brian Webb
a0bdc58e5b
Added framework for rfm22b com device.
2012-02-28 21:30:06 -07:00
Brian Webb
992aa3bec6
Updated PipX branch to use CDC device with a VCP (not working yet).
2012-02-25 09:07:37 -07:00
Brian Webb
e2cb750dc6
First cut on RadioComBridge module, which is intended to pass data from either a USART or a USB port to the PipX radio link.
2012-02-25 07:37:05 -07:00
Brian Webb
01f314724b
Updates to USB configuration on the PipXtreme.
2012-02-24 15:54:26 -07:00
Brian Webb
483a96c31d
Some more cleanup to PipXtreme codebase.
2012-02-24 07:49:41 -07:00
Brian Webb
b69b285f58
Fixed PipXtreme bootloader.
2012-02-23 20:40:24 -07:00
Brian Webb
182f285e60
Added missing startup file for PipXtreme.
2012-02-23 20:06:34 -07:00
Brian Webb
cf34baec69
Some cleanup on PipXtreme codebase.
2012-02-23 19:58:23 -07:00
Oleg Semyonov
2271b95816
Merge remote branch 'origin/next' into os/features/stick-deadband-next
...
Conflicts:
ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
ground/openpilotgcs/src/plugins/config/configtaskwidget.h
2012-02-23 08:32:27 +02:00
Oleg Semyonov
e62cc8914c
Merge remote branch 'origin/next' into os/features/pid-tuning-from-transmitter-next
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
shared/uavobjectdefinition/hwsettings.xml
2012-02-22 23:03:17 +02:00
Brian Webb
f0dfba6fc0
Re-baslined the PipX codebase using the experimental Transmitter codebase.
2012-02-21 20:29:06 -07:00
Oleg Semyonov
403e9cd220
TxPID module: add ILimit values to the list of settings
2012-02-21 19:57:10 +02:00
James Cotton
7b548eaa54
Fix bug in the integral for altitude hold where it was accumulating wrong variable.
2012-02-21 00:40:55 -06:00
Brian Webb
43f6458f86
Reduced the sizeof the UAVObject metadata by:
...
1) Combining all binary or mode values into a single byte
2) Adding accessor functions to read/write the flag bits
3) Reduced the size of the time values from 32 bits to 16 bits
2012-02-20 18:45:18 -07:00
James Cotton
900780e10c
Add bias estimation to the altitude fusion algorithm. Necessary to increase
...
the gains on acceleration and velocity feedback terms (they are a problem when
biased).
2012-02-19 11:38:09 -06:00
James Cotton
47fac7e31c
Move the throttle setting code for alt hold into the fast accel loop.
2012-02-18 18:16:15 -06:00
Oleg Semyonov
c721d001c0
Subtract deadband offset from then input to still have fine control
2012-02-18 10:21:51 +02:00
James Cotton
7d4582e5f0
Update the altitude KF to use the updated measurements appropriately and check
...
in the relevant matlab code to check it and genererate it. Produces quite
smooth traces.
2012-02-16 05:33:47 -06:00
James Cotton
c957172f8f
In the case of swapping in userspace due to the buffer being blocked during
...
ISR, make sure the latency is less than 50 us to avoid framesync errors. Still
seeing a few nonsense packets on Overo side but fairly few. Probably need to
add CRC to whole packet now and call it done.
2012-02-14 11:06:16 -06:00
James Cotton
1930d092eb
In the case where the overo scheduler cannot swap buffers (userspace loading
...
it) then set a flag so as soon as the buffer is loaded then we schedule it.
2012-02-14 11:00:29 -06:00
James Cotton
f04c58b0f4
Make the overo transaction occur based on the rising edge of the NSS line.
...
This fixes most of the frame sync problems. However, it's a bit hacky as
there is currently hardware information inside a module.
2012-02-14 10:37:30 -06:00
James Cotton
d018d93e88
Clean up previous commit a bit and make the sampling rate a variable (and adapt
...
the sampling time accordingly).
2012-02-13 01:49:54 -06:00
James Cotton
3acbfbe96c
Convert the pressure sensor code to most of the calculations as int64 to retain
...
precision.
2012-02-13 01:22:48 -06:00
James Cotton
4717af1afd
Swap telemetry port and gps ports back
2012-02-12 13:55:52 -06:00
James Cotton
f23f53dc4e
Add settings for the altitude kalman filter settings and init the state when
...
first measurement arrives
2012-02-12 09:07:27 -06:00
James Cotton
34ca5777dd
Kalman filter for altitude
2012-02-11 21:08:19 -06:00
James Cotton
d8f0494e57
Merge branch 'revolution' into revolution_overo
2012-02-11 20:02:20 -06:00
Alessio Morale
22b211167c
Ported pios_iap.c to F4
...
restored failed boot count check on pios_board.c for revo
2012-02-11 13:49:32 +01:00
James Cotton
3026527801
Now the desired altitude is relative to when the switch was flipped so that the
...
baro altitude module can use a smoothed altitude estimate for the starting
point.
2012-02-08 23:02:29 -06:00
James Cotton
80d602ef7b
Switch order of some commands to make sure it loads the correct hover throttle
2012-02-08 20:47:10 -06:00
James Cotton
ab41bae071
Separately smooth the error estimate from the derivative
2012-02-08 11:15:33 -06:00
James Cotton
60c951843d
Use backtracking to limit integral in altitude hold and smooth the velocity
...
error. Initialize the throttle integral better.
2012-02-08 10:39:31 -06:00
James Cotton
c6b1d6b8df
Rework the altitude hold code a bit
2012-02-08 09:42:10 -06:00
James Cotton
49a03a868b
Merge branch 'altitudehold' into revolution_overo
...
Conflicts:
flight/OpenPilot/UAVObjects.inc
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
flight/Revolution/Makefile
flight/Revolution/ins.c
2012-02-07 23:00:29 -06:00
James Cotton
6ec0f06c80
Back to 1024 byte packets
2012-02-07 13:02:11 -06:00
James Cotton
2c60447200
Switch back to 512 byte packets and fix bug when writing the header size that
...
was smashing the crc
2012-02-07 11:32:04 -06:00
James Cotton
221a0c5e53
Add the number of dropped updates to the overosync stats
2012-02-07 09:13:26 -06:00
James Cotton
a89d425b23
Reset the received rate for overo sync object
2012-02-07 09:01:58 -06:00
James Cotton
02bec750bd
In the attitude loop need to check all the queues even if unused or the event
...
system will have warnings
2012-02-07 08:46:34 -06:00
Stacey Sheldon
e2939dae2a
revo usb: Add support for USB to Revo
2012-02-07 02:25:31 -05:00
Stacey Sheldon
8b73ae7d16
remove trailing whitespace
2012-02-07 02:25:31 -05:00
Stacey Sheldon
b8c16fe7a5
hw defs: move misc defines and non-const data out of board_hw_defs.c
...
The board_hw_defs.c file should only contain static
const declarations that only describe the hardware.
All other non-const variables should be put into one
of the pios_board.c files.
2012-02-07 02:25:31 -05:00
Stacey Sheldon
3c1b1001f9
f4 usb: Allow USB descriptors to be const through ST APIs
2012-02-07 02:25:31 -05:00
Stacey Sheldon
56102013aa
f4 usb: correct function prototypes in bsp template
...
This file is not actually used but it should still be accurate.
2012-02-07 02:25:31 -05:00
Stacey Sheldon
57f9f6e3d1
f4 usb: configure and build ST USB OTG and USB DEV libraries
2012-02-07 02:25:31 -05:00
Stacey Sheldon
1e79ed6d54
f4 usb: fix invalid reference to stm32f4_discovery.h
2012-02-07 02:25:31 -05:00
Stacey Sheldon
04b81f13a7
f4 usb: fix invalid references to stm32f2xx.h
2012-02-07 02:25:31 -05:00
Stacey Sheldon
266b95561f
f4 usb: rename device template to real config file
2012-02-07 02:25:30 -05:00
Stacey Sheldon
a4ae844f2b
f4 usb: rename otg template to real config file
2012-02-07 02:25:30 -05:00
Stacey Sheldon
58bbe0870d
f4 usb: allow device->host data to be const
...
This allows the application code to pass const
descriptors to the Tx APIs in the STM32 USB
library.
2012-02-07 02:25:30 -05:00
Stacey Sheldon
4b911bb3be
f4 usb: remove unused device class examples
2012-02-07 02:25:30 -05:00
Stacey Sheldon
efbe8bbfdd
f4 usb: convert all line endings to LF-only
...
Line ending changes only. No functional changes.
2012-02-07 02:25:30 -05:00
Stacey Sheldon
6a43d1c7ed
f4 usb: Import pristine STM32F4 USB Library v1.1.0
...
Taken from version STM32F4-Discovery_FW_V1.1.0 of the
library from ST.
2012-02-07 02:25:30 -05:00
Stacey Sheldon
240425ff22
gdb: add config file for revo bl
2012-02-07 02:25:30 -05:00
Stacey Sheldon
1532338847
ef: fix dependencies in entire flash image build
...
ef_$(BOARD_NAME).bin files were not properly depending
on their fw and bl files resulting in the ef files not
being regenerated.
2012-02-07 02:25:30 -05:00
James Cotton
ae01936808
Add the portTickTime into the OveroSync stream
2012-02-06 10:00:02 -06:00
James Cotton
dbcb499d7f
Add object to monitor the overo link status. Current just records the bytes/s
...
being sent and the connected status (based on sending more than 500 bytes per
second)
2012-02-06 09:37:31 -06:00
James Cotton
5b2376dbee
Remove the semaphore for buffer swapping and make this occur during the receive
...
ISR. This leads to a possible condition where a copy is taking place in
userspace and then a buffer swap interrupts it. However, the copy should
always finish before the SPI DMA slave catches up to that place in memory at 10
MHz.
This fixes a common condition where the userspace task (low priority) was not
swapping buffers in time from user space and logs were corrupted.
2012-02-06 08:21:24 -06:00
James Cotton
179e66b754
Refactor how new packets are scheduled to avoid trying to start a transaction
...
from an ISR. This was causing lock ups. It's a bit higher latency probably
(trivially slow) but if we aren't keeping up with the Overo transactions then
using a proper DMA double buffer will be required.
2012-02-04 20:11:31 -06:00
James Cotton
665801662d
In cc3d update sensors add accelbias before scaling to allow more precision in
...
levelinIn cc3d update sensors add accelbias before scaling to allow more
precision in levelingg
2012-02-04 12:12:41 -06:00
James Cotton
4e190f99e2
Improved the revo overosync code to put multiple uavobjects into a packet
2012-02-04 12:06:03 -06:00
Stacey Sheldon
60a2af2e58
ef+dfu: Move EF image generation into separate makefile
...
A separate makefile for EF (Entire Flash) targets allows
the removal of board-specific hard-coded addresses. These
values can now be included from the board-info.mk files
for each board.
2012-02-04 12:03:42 -05:00
Brian Webb
3f66afd74a
Removed emacs mode header from pios_gcsrcvr.c
2012-02-04 08:42:16 -07:00
Stacey Sheldon
4fafbb13ed
makefile: Add EF (Entire Flash) targets for all boards
...
These new build targets will construct a flash image that
includes both a bootloader as well as a firmware image all
in one. Examples:
make ef_coptercontrol
make ef_revolution
This also adds support for a new target for writing this EF
image to boards that support a DFU interface (only F4-based
boards). This can be done by running:
make dfuutil_install
# Boot board with SBL asserted to activate STM32 DFU ROM
# Attach USB cable
make ef_revolution_dfu
Bootloader images are also now padded out to occupy the full
BL flash region.
2012-02-03 00:59:36 -05:00
Stacey Sheldon
ce544cf4ab
gdb: remove cortex_m3 remnants from revo gdb init file
2012-02-03 00:59:31 -05:00
Stacey Sheldon
99f5f20cb2
openocd: add support for stlink on stm32f4 targets
2012-02-03 00:51:31 -05:00
Brian Webb
a314604f9b
Added failsafe to GCS Receiver device.
2012-02-02 19:59:42 -07:00
James Cotton
18a64e261f
Going a bit overkill with this - deinit who SPI block between transactions.
2012-02-02 12:32:57 -06:00
James Cotton
c26154f303
Switch back to 256 byte packets and 0xFF pad the end
2012-02-02 11:40:49 -06:00
James Cotton
03cfb1453a
DeInit SPI DMA between transactions. Somehow if this doesn't happen the next
...
transaction doesn't start at the beginning again. Something is still not quite
right because first few bytes aren't getting across. Need logic analyzer.
2012-02-02 11:37:35 -06:00
James Cotton
77a6abb341
For PIOS_SPI F4 do not enable the TX irq. Also do not wait for the
...
transmission to finish either.
2012-02-02 11:24:14 -06:00
James Cotton
8b1137c6a0
Align the tx and rx SPI buffers from Overosync
2012-02-02 11:23:40 -06:00
James Cotton
0a71a48c57
Sending all FF finally again
2012-02-02 10:36:09 -06:00
James Cotton
80b839d145
The SPI3 TX DMA channel was wrong
2012-02-02 10:13:09 -06:00
James Cotton
29237f97ae
For SPI slave devices we need to handle the interrupt differently since
...
transactions should already be completed. Also reset the callback so in the
case of noise on the IRQ line it will not keep firing interrupts.
I suspect we should probably disable interrupts in this handler to prevent
refiring.
2012-02-02 10:13:09 -06:00
James Cotton
88b9f20cda
Fix nasty bug in the DMA stream configuration
2012-02-02 10:13:09 -06:00
James Cotton
95abb56d5e
Added module to send updates out the SPI port
2012-02-02 09:19:25 -06:00
James Cotton
e434ab94a9
Enable SPI port for revolution to overo communications
2012-02-02 01:42:38 -06:00
Alessio Morale
5449408763
Merge branch 'amorale/timerprescaler' into inoutch8
2012-02-01 00:23:53 +01:00
Alessio Morale
cb2dadd0ea
fix Motor 8 out not working
2012-02-01 00:20:50 +01:00
Alessio Morale
322ced44a1
Solve PWM Input 8 not working
2012-02-01 00:16:48 +01:00
Alessio Morale
820e8ac062
Handle different prescaler values for timers on APB1 and APB2.
...
The PIOS_MASTER_CLOCK has been removed in favor of
PIOS_SYSCLK (the master clock value,168000000 for revolution)
PIOS_PERIPHERAL_APB1_CLOCK and
PIOS_PERIPHERAL_APB2_CLOCK
Look at STM32F4xx_Revolution.h for the list of timer/peripheral and APB them belongs.
2012-01-28 20:04:55 +01:00
James Cotton
a778c45d6f
For L3GD20 sensor task run at the sensor speed
2012-01-28 10:11:30 -06:00
James Cotton
13447ac907
Fix the MPU6000 implementation
2012-01-28 00:21:58 -06:00
James Cotton
e07fca0465
Commit the revolution board_hw_defs.c file
2012-01-26 23:32:36 -06:00
James Cotton
b4435d0b35
For L3GD20 sensor task on revo update gyro once per physical sample
2012-01-26 23:29:12 -06:00
James Cotton
f311700804
Flashfs: Whenever failing out of a transaction unlock the semaphore
2012-01-26 14:14:50 -06:00
James Cotton
85bfa7dcf9
Flashfs: Missed calculation of the header crc for monolitihic write
2012-01-26 13:32:53 -06:00
James Cotton
84dd1dbc40
A bit more lenient settings for CC sensor timings
2012-01-26 13:00:06 -06:00
James Cotton
ad3d470f40
Flashfs and Flash: Add new function to write a series of blocks in one flash
...
write transaction to improve efficieny.
2012-01-26 12:39:35 -06:00
James Cotton
80705cdba1
Flash: Because on CC/CC3D the flash is initialized before FreeRTOS is started
...
we cannot use the transaction lock or the delay while saving.
2012-01-26 11:50:05 -06:00
James Cotton
4fc907ad0d
Add a transaction semaphore to flash and flashfs to make sure multiple saves
...
or loads can't be attempted between threads
2012-01-26 11:36:07 -06:00
James Cotton
8b15fdd88b
Flash: Add a vTaskDelay when waiting for flash operations to complete to
...
prevent blocking the bus from accels
2012-01-26 11:26:19 -06:00
James Cotton
7f38d113eb
Delete more old target stuff
2012-01-26 11:21:34 -06:00
James Cotton
e69a0937bc
Flash: Wrote status instead of read it
2012-01-26 11:17:00 -06:00
James Cotton
69dc5abf0c
Flash: Get rid of some defines and directly reference the cfg structure
2012-01-26 10:56:26 -06:00
James Cotton
6d572986e5
Flashfs: Clean up some of the JEDEC commands and also format whole chip when FS
...
is wrong.
2012-01-26 10:04:49 -06:00
James Cotton
fe7b9a909a
LED: Update the LEDs on revo
2012-01-26 09:11:27 -06:00
James Cotton
7eab883d5c
Fix some small revolution typos
2012-01-25 22:50:19 -06:00
James Cotton
20670d049b
Update pios_led for F4 targets to match the new F1 implementation. Also fix
...
type for F1 in GPIO labels.
2012-01-25 22:50:19 -06:00
James Cotton
727f0befc5
Make the gyro go a bit more regularly to stabilization but needs updating
...
regular CC
2012-01-25 22:50:19 -06:00
James Cotton
e4df3202e0
L3GD20: Update sensor task for revo to use the new queue
2012-01-25 22:50:19 -06:00
James Cotton
205aabe895
L3GD20: Make this sensor push data onto a FreeRTOS queue so that the sensor
...
reading task can block according. Also now the gyro data is sent to
stabilization multiple times per update of the attitude loop.
2012-01-25 01:20:07 -06:00
James Cotton
0da20bb846
Flash: Because most of the commands are a JEDEC standard rename this file
...
pios_flash_jedec and abstract out the methods that can vary between chips.
2012-01-25 00:23:24 -06:00
James Cotton
a02cad6f52
Flashfs: Separate out the sector sizes and magic values into a runtime
...
configurable structure. This makes it easier to deal with different chip
layouts.
2012-01-24 23:56:59 -06:00
James Cotton
1971ba30dc
No longer hardcode baudrate
2012-01-24 23:42:43 -06:00
James Cotton
5ad37e691c
USB: Update the USB configuration structure to include the GPIO that is used
...
for sensing and then load different config for CC and CC3D. Updated the
bootloader as well. Also changed the PIOS_USB_CheckAvailability function to
only return the sense signal and not the transfer_possible flag as this is not
set in time for the bootloader on CC3D for some reason.
2012-01-24 22:15:43 -06:00
James Cotton
bc3703ce33
Need more irq stack for CC3D
2012-01-24 19:48:52 -06:00
James Cotton
104c091590
Correct the range constants for the L3GD20 driver
2012-01-24 19:48:14 -06:00
James Cotton
a25d52785b
Change the bus speed for the L3GD20 to 10MHz and some small cleanups
2012-01-24 19:17:49 -06:00
James Cotton
3880b0ddc3
CC3D and CC use different CS lines for the flash chip. Add a second cfg
...
structure for each SPI interface.
2012-01-24 16:21:48 -06:00
James Cotton
587ec5a615
Revert earlier patch on filesystem for Revolution. Need to make erase command
...
and positioning of filesystem dependent on board type.
Reverted 99123372d0
2012-01-24 16:14:41 -06:00
James Cotton
b6c056fef2
Use the updated L3GD20 format and make attitude.c use the gyro data from the
...
fifo
2012-01-24 15:52:17 -06:00
James Cotton
c9263cb8c0
L3GD20: Dynamically allocate buffer structure when used
2012-01-24 15:51:38 -06:00
James Cotton
5efbfb02fa
Make the BMA180 sensor system acquire from the queue. Correct the orientation
...
and speed it up to 10 MHz communications.
2012-01-24 15:09:20 -06:00
James Cotton
8c208412c9
Give the BMA180 a dynamically allocated device structure and also make it
...
properly bind to a SPI and slave number. Temporarily reducing spi bus to
slowest possible speed.
2012-01-24 14:38:00 -06:00
James Cotton
aec7dd0b00
Initialize the LEDs early in the bootup process
2012-01-24 14:37:04 -06:00
James Cotton
8e79bc2ee2
Temporarily refactor attitude to directly read the sensors instead of pull from
...
their queues until the interrupts are working properly
2012-01-24 11:54:23 -06:00
James Cotton
e9552065a9
Reenable the CC3D sensors
2012-01-24 11:03:33 -06:00
James Cotton
466992a907
Migrate some of the CC board settings to the new board_hw_defs
2012-01-24 10:58:40 -06:00
James Cotton
c242ab8b86
Merge branch 'next' into revolution3
...
Conflicts:
flight/AHRS/ahrs.c
flight/AHRS/pios_board.c
flight/Bootloaders/Revolution/Makefile
flight/CopterControl/System/pios_board.c
flight/INS/pios_board.c
flight/OpenPilot/Makefile
flight/OpenPilot/System/openpilot.c
flight/OpenPilot/System/pios_board.c
flight/PiOS/Boards/STM32103CB_CC_Rev1.h
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/Revolution/Makefile
flight/Revolution/System/inc/pios_config.h
flight/Revolution/test.c
2012-01-24 10:46:35 -06:00
James Cotton
f029567e66
Remove meaningless settings from CC config file
2012-01-24 10:39:35 -06:00
James Cotton
66293a9788
Merge remote-tracking branch 'origin/stac/led-boottime-config' into next
2012-01-24 10:38:33 -06:00
James Cotton
7c22215e0b
Patch from Sambas to fix F4 on windows
2012-01-24 10:33:07 -06:00
James Cotton
486cdb5dbb
Got CC running again although with altitude and bmp085 disabled as well as the
...
CC3D drivers.
2012-01-24 10:32:42 -06:00
James Cotton
be50c00b7c
Make sure BMA180/L3GD20 can be disabled
2012-01-24 09:23:13 -06:00
James Cotton
4d3af7afbf
Add ID test to ADXL345
2012-01-24 09:23:12 -06:00
James Cotton
946c6a7f1d
Fix small bugs in pios_board.c relating to adxl345 spi configuration
2012-01-24 09:23:12 -06:00
James Cotton
728c05f973
Crude implementation of sensor reading for CC3D
2012-01-24 09:23:12 -06:00
James Cotton
0cb6b13d33
Add BMA180 to CopterControl 3D. Had to reduce the stack space by 256 bytes.
...
Some can be reclaimed by making the BMA180 allocate its fifo dynamically but
I'll do that later when it uses FreeRTOS queues for the FIFO.
2012-01-24 09:23:12 -06:00
James Cotton
11471ff68b
Update drivers for CC to the new EXTI system and SPI calls
2012-01-24 09:23:12 -06:00
James Cotton
a20d654744
Update the attitude algorithm for CC to use the Gyros and Accels UAVObjects
...
instead of AttitudeRaw
2012-01-24 09:23:12 -06:00
James Cotton
4cf82815ce
Get the right pios_iap.c from next
2012-01-24 09:23:07 -06:00
James Cotton
aaf1c5dfdd
Update the F1 SPI library to support multiple NSS lines
2012-01-23 23:27:02 -06:00
James Cotton
5fd458426a
Merge branch 'cc3d' into revolution3
...
Conflicts:
flight/PiOS/inc/pios_l3gd20.h
flight/PiOS/pios.h
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
2012-01-23 22:09:45 -06:00
Stacey Sheldon
5907022b6d
Merge remote-tracking branch 'origin/stac/ld-2.22-fix' into next
2012-01-23 23:05:52 -05:00
James Cotton
bcb49cbd33
Merge branch 'next' into cc3d
...
Conflicts:
flight/PiOS/STM32F10x/pios_exti.c
2012-01-23 17:09:47 -06:00
James Cotton
2524662475
Copy the BMP085 back from next
2012-01-23 16:58:07 -06:00
James Cotton
b01d5c6b87
Include the drivers from the common directory
2012-01-23 16:58:07 -06:00
James Cotton
886d5456ac
Update pios_exti for F4
2012-01-23 16:55:54 -06:00
James Cotton
9a12299074
Update the driver cfg structures for the EXTI changes. Make the drivers call
...
the pios_exti_init instead of their individual implementations.
2012-01-23 16:55:52 -06:00
James Cotton
b2a292e9c4
Move all the drivers to the PiOS/Common directory to prepare for refactoring
...
the EXTI calls they make to the portable version
2012-01-23 10:11:46 -06:00
James Cotton
c84240e485
Merge branch 'next' into revolution3
...
Conflicts:
flight/PiOS/STM32F10x/pios_bmp085.c
flight/PiOS/STM32F10x/pios_exti.c
2012-01-23 06:51:30 -06:00
James Cotton
21ae37b3de
Remove BMP085 driver from F4 target
2012-01-23 06:44:25 -06:00
James Cotton
d864b481a1
Fix a few more merge conflicts
2012-01-23 04:47:35 -06:00
Stacey Sheldon
bfe6676eed
exti: rewrite exti layer to improve portability
...
The exti layer now allows drivers to register interrupt callbacks
during board initialization. All details of the driver using a
particular EXTI pin have been removed from the EXTI layer so it
can now be used on any board without board-specific modification.
This includes some nice refinements provided by Mike Smith during
initial review. His original commits have been squashed into this
one.
2012-01-22 23:23:41 -05:00
Stacey Sheldon
dc4aa07a32
board_hw_defs: factor out board-specific hw config definitions
...
Board specific HW configuration is now collected in a single .c
file for each board. This HW configuration is #include'd into
the FW, BL and BU builds for each board.
These new .c files are found in:
flight/board_hw_defs/<board_name>/board_hw_defs.c
Parts of this information were previously duplicated between
the BL and FW builds. This commit cleans up the duplication.
Using a #include on a .c file is a bit ugly but it allows us
to ensure that all of the symbols in the board_hw_defs.c file
are *ONLY* used in the PIOS_Board_Init() function for each
software build.
2012-01-22 19:41:41 -05:00
Stacey Sheldon
6bb4f0c61d
leds: use boot-time config for PiOS LED layer
...
LEDs are now configured based on a board-specific initialization
in PIOS_BOARD_Init().
LEDs are now named:
PIOS_LED_HEARTBEAT
PIOS_LED_ALARM
2012-01-22 18:22:59 -05:00
Stacey Sheldon
3cbf4499e1
ld: make sure current pointer never goes backwards
...
Fixes linking on ld version 2.22.
2012-01-21 21:18:06 -05:00
James Cotton
cc0cbf0381
Enable IAP code on revolution now
2012-01-21 13:22:39 -06:00
James Cotton
fe44a3d37a
Reference correct taskmonitor file compiled in to revolution
2012-01-21 13:22:17 -06:00
James Cotton
e505de7ba0
Remove redundant remap field from merge
2012-01-21 13:22:00 -06:00
James Cotton
838370b3a4
Fix calls to backup registers on F4
2012-01-21 13:21:37 -06:00
James Cotton
bb0bfe0ae4
Merge branch 'next' into revolution3
...
Conflicts:
flight/Bootloaders/CopterControl/Makefile
flight/Bootloaders/PipXtreme/Makefile
flight/Bootloaders/Revolution/inc/pios_config.h
flight/CopterControl/Makefile
flight/INS/inc/pios_config.h
flight/Libraries/taskmonitor.c
flight/Modules/Altitude/altitude.c
flight/Modules/Attitude/attitude.c
flight/OpenPilot/Makefile
flight/OpenPilot/Makefile.posix
flight/OpenPilot/System/inc/pios_usb_board_data.h
flight/OpenPilot/System/inc/taskmonitor.h
flight/OpenPilot/System/pios_board.c
flight/OpenPilot/System/taskmonitor.c
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/PiOS/STM32F4xx/pios_bmp085.c
flight/PiOS/STM32F4xx/pios_iap.c
flight/PiOS/pios.h
flight/Revolution/System/inc/pios_config.h
flight/Revolution/System/inc/taskmonitor.h
flight/Revolution/System/taskmonitor.c
ground/openpilotgcs/src/plugins/serialconnection/serialplugin.cpp
shared/uavobjectdefinition/systemalarms.xml
shared/uavobjectdefinition/taskinfo.xml
2012-01-21 11:27:03 -06:00