Commit Graph

2257 Commits

Author SHA1 Message Date
Andrew Tridgell
a0c57979ab HAL_ChibiOS: use opendrain outputs for LEDs on iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell
7168a0297a HAL_ChibiOS: display RC protocol for iocmu 2018-11-07 07:35:45 +11:00
Andrew Tridgell
a69f66eadd HAL_ChibiOS: ensure RCIN sigbuf has even number of words
ObjectBuffer rounds up by 1, leaving an odd number of words, which
caused DSM RC input corruption
2018-11-07 07:35:45 +11:00
Andrew Tridgell
6c128fcaf2 HAL_ChibiOS: signal2 does not need to be DMA safe 2018-11-07 07:35:45 +11:00
Andrew Tridgell
e3a01c661f HAL_ChibiOS: switched to USB for console on pixracer 2018-11-07 07:35:45 +11:00
Andrew Tridgell
56203204cc HAL_ChibiOS: fixed build of bootloaders 2018-11-07 07:35:45 +11:00
Andrew Tridgell
b950b83eea HAL_ChibiOS: fixed build with EICU RC input 2018-11-07 07:35:45 +11:00
Andrew Tridgell
5dd0086698 HAL_ChibiOS: make SoftSigReader considerably more efficient
this reduces interrupt latency on the F100, which allows us to use all
RC input protocols on the pulse based decoder, allowing for more
flexibility in RC input protocols
2018-11-07 07:35:45 +11:00
Andrew Tridgell
dbc05f787b HAL_ChibiOS: display decoded RC protocol 2018-11-07 07:35:45 +11:00
Andrew Tridgell
d18277487e HAL_ChibiOS: use RCIN pin for only PPM only on iomcu
use uarts for SBUS and other serial protocols
2018-11-07 07:35:45 +11:00
Andrew Tridgell
7c1ba15031 HAL_ChibiOS: fixed syntax error on RCIN pin for iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell
86ab3d7669 HAL_ChibiOS: turn off green ring LED on cube 2018-11-07 07:35:45 +11:00
Andrew Tridgell
fcc259ae31 HAL_ChibiOS: separate out F1 CR1 calculations
and modify pin speeds for iomcu uarts
2018-11-07 07:35:45 +11:00
Andrew Tridgell
7e66bb69b9 HAL_ChibiOS: enable amber LED on iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell
3ab1cd4808 HAL_ChibiOS: fixed build 2018-11-07 07:35:45 +11:00
Eugene Shamaev
032c5ab707 AP_HAL_ChibiOS: Binding update for DSM 2018-11-07 07:35:45 +11:00
Andrew Tridgell
f69360844f HAL_ChibiOS: enable USART1 for iomcu for spektrum input 2018-11-07 07:35:45 +11:00
Andrew Tridgell
065dba973b HAL_ChibiOS: fixed build warning on iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell
81fe8b7138 HAL_ChibiOS: allow set of safety mask from IOMCU 2018-11-07 07:35:45 +11:00
fat_dell
d1f557e96b HAL_ChibiOS: added Omnibusf4v6 board, based on omnibusnanov6. 2018-11-04 22:00:15 +11:00
Andrew Tridgell
49ce9d02b1 HAL_ChibiOS: ensure RC in channels are bounded 2018-11-02 22:52:25 +11:00
vierfuffzig
e04ebb1326 HAL_ChibiOS: set BATT_MON default on boards with onboard volt/curr sens 2018-10-31 21:29:33 +11:00
Andrew Tridgell
78a32df2e7 HAL_ChibiOS: make all boards base GPIOs for servos at 50
this makes the docs for GPIO pins consistent across boards
2018-10-31 20:10:52 +11:00
fnoop
deeaf6ec09 AP_HAL_ChibiOS: Add UARTS to F405-Wing bootloader
AP_HAL_ChibiOS: Add pins to support new UART_ORDER uarts

AP_HAL_ChibiOS: Add UARTs to F405-Wing hwdef-bl.dat to support firmware upload on UARTS
2018-10-31 16:01:39 +11:00
Peter Barker
d2cf065fdf AP_HAL_ChibiOS: return uart link bandwidth 2018-10-30 19:31:37 +11:00
Andrew Tridgell
7e777d8b28 HAL_ChibiOS: disable loop() delay for iofirmware 2018-10-30 13:00:48 +11:00
Andrew Tridgell
6c761fa864 HAL_ChibiOS: shutdown IOMCU on reboot 2018-10-30 13:00:48 +11:00
Andrew Tridgell
b3946fc458 HAL_ChibiOS: added uart for sbus out in IOMCU 2018-10-30 13:00:48 +11:00
Andrew Tridgell
af4340d1d1 HAL_ChibiOS: enable analog input on IOMCU 2018-10-30 13:00:48 +11:00
Andrew Tridgell
a6b35d6496 HAL_ChibiOS: restore old ODR behaviour for F4 boards
This fixes an issue with ESP8366 on Pixracer
2018-10-30 12:49:16 +11:00
Andrew Tridgell
6dd44a6d35 HAL_ChibiOS: fixed LED mapping for fmuv4 2018-10-29 14:04:32 +11:00
vierfuffzig
895cc0713b ChibiOS: fix F35Lightning default BATT_CURR_SCALE 2018-10-24 07:45:10 +10:00
Andrew Tridgell
d644150871 HAL_ChibiOS: fixes for DrotekP3Pro 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
6f99c706d6 HAL_ChibiOS: add MCU tables for STM32F469 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
bf745d1960 HAL_ChibiOS: add DrotekP3Pro hardware definitions 2018-10-21 09:59:44 +11:00
Phillip Kocmoud
44fb61da37 HAL_ChibiOS: mRo X2.1-777 / hwdef.dat
Set proper sensor orientation.
2018-10-21 07:50:44 +11:00
Andrew Tridgell
c622a4c4d6 HAL_ChibiOS: fixed output pins on F100 iomcu 2018-10-17 16:45:37 +11:00
Andrew Tridgell
7b67146bc4 HAL_ChibiOS: use less memory in SoftSigReader 2018-10-17 15:11:28 +11:00
Andrew Tridgell
d083cd87d6 HAL_ChibiOS: disable debug code by default for iomcu
use --enable-asserts instead
2018-10-17 15:11:28 +11:00
Andrew Tridgell
d7aaaa35bd HAL_ChibiOS: disable RCIN and timer threads for iomcu 2018-10-17 15:11:28 +11:00
Andrew Tridgell
8a4e0bd58c HAL_ChibiOS: fixed RCIN for iomcu
we need to disable/re-enable DMA on each IRQ for the STM32F10x
2018-10-17 15:11:28 +11:00
Andrew Tridgell
15141a6a5a HAL_ChibiOS: allow for no RCIN or TIMER thread
saves memory on iomcu
2018-10-17 15:11:28 +11:00
Andrew Tridgell
4674a1c68d HAL_ChibiOS: fixed system time for clocks other than 1MHz
needed for IOMCU
2018-10-17 15:11:28 +11:00
Andrew Tridgell
298a91ac7c HAL_ChibiOS: allow reduction of memory for SoftSigReader
for IOMCU
2018-10-17 15:11:28 +11:00
rain-er
565b370330 UART4 added for BLHeli ESC telemetry 2018-10-17 13:57:19 +11:00
Andrew Tridgell
4416404137 HAL_ChibiOS: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Phillip Kocmoud
f1d223a32a HAL_ChibiOS: Add support for the mRo X2.1-777
a new flight controller from Mayan Robotics based on the x2.1 upgraded to a STM32F777 MCU
2018-10-16 09:37:39 +11:00
vierfuffzig
2243c524db Chibios: Add board FuriousFPV F35Lightning 2018-10-12 20:28:50 +11:00
Andrew Tridgell
bcc1bd9752 HAL_ChibiOS: added realloc implementation
needed for AP_Scripting
2018-10-09 10:08:52 +11:00
Michael du Breuil
8382d377bd AP_HAL_ChibiOS: Add a BUFSIZ value 2018-10-09 10:08:52 +11:00
Michael du Breuil
11ab6c59e1 AP_HAL_ChibiOS: Handle scripting priority 2018-10-09 10:08:52 +11:00
Randy Mackay
c1ab3afb6c AP_HAL_ChibiOS: fix safety switch option handling 2018-10-04 16:13:24 +10:00
Andrew Tridgell
8c391291a3 HAL_ChibiOS: fixed a race in DShot code
this fixes a problem found by Daniel Met with the copter 3.6 beta
release
2018-10-03 15:28:07 +10:00
Michael du Breuil
9a48a0835e AP_HAL_ChibiOS: Don't redefine errno 2018-10-03 08:01:13 +10:00
Michael du Breuil
f810b7b9f6 AP_HAL_ChibiOS: Make getcwd() take size_t as per the standard 2018-10-02 06:04:40 +10:00
Michael du Breuil
7fda309d3c AP_HAL_ChibiOS: Remap unused pins to ADC 2018-09-20 01:07:47 +01:00
Siddharth Purohit
8ac38d73f7 HAL_ChibiOS: add option for NO_FASTBOOT build and enable it for iomcu 2018-09-19 12:14:15 +10:00
Siddharth Purohit
6622c9b8fd HAL_ChibiOS: wrap sscanf and snprintf methods 2018-09-19 12:14:15 +10:00
Siddharth Purohit
05539cd93b HAL_ChibiOS:remove print statement left over from previous changes 2018-09-19 12:14:15 +10:00
Siddharth Purohit
2d1153081c HAL_ChibiOS: do not build float support for bootloader builds 2018-09-19 12:14:15 +10:00
Siddharth Purohit
f9149f45b2 HAL_ChibiOS: explicitly mention if RTC not available 2018-09-19 12:14:15 +10:00
Siddharth Purohit
22f74b0827 HAL_ChibiOS: add option to set iomcu firmware environment var 2018-09-19 12:14:15 +10:00
Siddharth Purohit
42b4730d88 HAL_ChibiOS: add changes to hwdef to support STM32F1 based controller 2018-09-19 12:14:15 +10:00
Siddharth Purohit
1a20fb4ea9 HAL_ChibiOS: disable flash methods where there is no Flash API support 2018-09-19 12:14:15 +10:00
Siddharth Purohit
847aca3c30 HAL_ChibiOS: reduce signal transitions count to save RAM 2018-09-19 12:14:15 +10:00
Siddharth Purohit
b9319cae56 HAL_ChibiOS: disable segments relating to unused features 2018-09-19 12:14:15 +10:00
Siddharth Purohit
87a2dea9d4 HAL_ChibiOS: disable features that require advanced dma 2018-09-19 12:14:15 +10:00
Siddharth Purohit
0f07480faf HAL_ChibiOS: continue main_loop branching from main instead of allocating a separate thread 2018-09-19 12:14:15 +10:00
Siddharth Purohit
e824a9c360 HAL_ChibiOS: add hwdef files to support IOMCU 2018-09-19 12:14:15 +10:00
Andrew Tridgell
340f1b43e6 HAL_ChibiOS: fixed RSSI voltage from IOMCU 2018-09-15 16:08:32 +10:00
Andrew Tridgell
8c33b4b97d HAL_ChibiOS: implement set_failsafe_pwm() 2018-09-13 08:15:02 +10:00
Andrew Tridgell
490d6eea20 HAL_ChibiOS: fixed ADC bug
this caused bad analog readings when the number of channels being read
was more than the number of hw channels

thanks to @vierfuffzig for reporting!
2018-09-12 07:10:04 +10:00
s0up
066cf90111 HAL_ChibiOS: Add speedybee hardware definition 2018-09-07 08:33:35 +10:00
Paul Atkin
bb99165221 HAL_ChibiOS: updates for KakuteF7
fixed PWM and added full tonealarm support
2018-09-06 10:11:34 +10:00
Andrew Tridgell
a9e29f7556 HAL_ChibiOS: added pullup/pulldown support on GPIO
using the convention of write() on an input pin to set pullup/pulldown
2018-09-06 07:20:46 +10:00
Michael du Breuil
f6cb196d53 AP_HAL_ChibiOS: Remove unimplemented force_safety_no_wait()
ChibiOS doesn't implement the method, so there is nothing to be gained
by calling the function.
2018-09-04 10:23:18 +10:00
Hannes Verschore
fefde53d58 AP_HAL_ChibiOS: Fix comment in Device.cpp
This was decreased to 100 in b07c599bf2 . I assume it would be best to also update the comment.
2018-08-31 08:36:47 +09:00
Andrew Tridgell
8c962e6f0f HAL_ChibiOS: use a larger TX buffer on USB
this is needed for fast log download on vehicles with 50Hz main loop
2018-08-28 08:50:50 +10:00
Andrew Tridgell
33076be585 HAL_ChibiOS: fixed handling of 16 bit timers
when we have a 16 bit timer then systime_t is 16 bit, and we need to
handle wrap of get_systime_us32()
2018-08-26 18:34:26 +10:00
Andrew Tridgell
dc20e2baed HAL_ChibiOS: support recursive semaphores 2018-08-25 15:44:36 +10:00
Andrew Tridgell
db9a8f16ed HAL_ChibiOS: enable terrain on Pixracer, minpx-v2 and mini-pix 2018-08-24 19:43:27 +10:00
Andrew Tridgell
5526dac4fc HAL_ChibiOS: probe all i2c baros for revo-mini
this ensures we build this functionality in CI
2018-08-23 13:29:59 +10:00
Peter Barker
2209e4a697 AP_HAL_ChibiOS: new HAL functor-based methods
AP_HAL_ChibiOS: adjust for irq-type enumeration change

AP_HAL_ChibiOS: implement attach-AP_HAL::Proc to interrupt interface
2018-08-21 20:34:01 +09:00
Andrew Tridgell
d3af854949 HAL_ChibiOS: fixed bootloader build 2018-08-16 12:40:10 +10:00
Andrew Tridgell
dabdb969f6 HAL_ChibiOS: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Alexander Malishev
05099b8b8b HAL_ChibiOS: restore default dataflash buffer size
This fix log corruption in copter
2018-08-15 10:15:09 +10:00
Francisco Ferreira
1b46104a98 AP_HAL_ChibiOS: fix warning when STDOUT is defined
../../libraries/AP_HAL_ChibiOS/UARTDriver.cpp:118:12: warning: 'int hal_console_vprintf(const char*, va_list)' defined but not used [-Wunused-function]
 static int hal_console_vprintf(const char *fmt, va_list arg)
            ^
2018-08-14 10:17:38 +10:00
mirkix
c33b692f53 AP_HAL_ChibiOS: fix CubeYellow build 2018-08-14 06:26:22 +10:00
Francisco Ferreira
7278af05e0
AP_HAL_ChibiOS: remove CAN thread management 2018-08-12 13:35:01 +01:00
Francisco Ferreira
e1bf89f32d
AP_HAL_ChibiOS: fix CAN manager initialization 2018-08-12 13:35:01 +01:00
Andrew Tridgell
385f735799 HAL_ChibiOS: avoid 64 bit maths in AP_HAL::micros()
this saves a few cycles
2018-08-08 21:24:49 +10:00
vierfuffzig
bc52d430f9 Chibios add bootloader for mini-pix 2018-08-07 07:09:39 +10:00
Andrew Tridgell
846418e5e9 HAL_ChibiOS: raise timer thread priority
needs to be above main for guaranteed DShot and oneshot output periods
2018-08-06 11:41:42 +10:00
Andrew Tridgell
3df2a1c228 HAL_ChibiOS: fixed dshot bad frames
adding a pre-bit on the DMAR, and ensuring that all groups are setup
for DMA together fixes the remaining bad frames reports in BLHeli32
2018-08-04 19:29:13 +10:00
Andrew Tridgell
946b4db0e6 HAL_ChibiOS: set min dshot separation to 100usec
this fixes a problem with BLHeli32 not recognising dshot
2018-08-04 19:29:13 +10:00
Andrew Tridgell
22ba9a0aea HAL_ChibiOS: fixed timeout of serial read bytes
this allows for fast timeout of serial read bytes in BLHeli pass-thru
2018-08-04 19:29:13 +10:00
Lucas De Marchi
668c941717 Global: use new version of ARRAY_SIZE 2018-08-04 15:31:55 +10:00
utkinpol
2912e732b4 HAL_ChibiOS: updated for KakuteF7 2018-08-04 08:24:49 +10:00
Andrew Tridgell
64c8ca514c HAL_ChibiOS: fixed attach_interrupt check
we can't have two handlers on the same pad
2018-08-03 13:44:59 +10:00
Andrew Tridgell
4e6ac85057 HAL_ChibiOS: use 32 bit time intervals
this makes for smaller and faster code. We really don't need 64 bit
intervals as long sleeps are done with a loop.
2018-08-03 13:44:59 +10:00
Andrew Tridgell
1bd0ea079b HAL_ChibiOS: fixed build on older compilers
allow build with gcc 4.9.x
2018-08-03 13:44:59 +10:00
Andrew Tridgell
7aba99e229 HAL_ChibiOS: fixes for ChibiOS version update 2018-08-03 13:44:59 +10:00
Andrew Tridgell
f8e2edbc7f HAL_ChibiOS: fixed cache flush for updated ChibiOS version 2018-08-03 13:44:59 +10:00
Siddharth Purohit
2604b00b43 HAL_ChibiOS: use ch.h header for oslib api 2018-08-03 13:44:59 +10:00
Siddharth Purohit
ff65487ab3 HAL_ChibiOS: follow updated gpio pin setup procedure 2018-08-03 13:44:59 +10:00
Siddharth Purohit
5f88163e17 HAL_ChibiOS: update configuration and rtlib headers for ChibiOS 18.x.x 2018-08-03 13:44:59 +10:00
Siddharth Purohit
395c48933c HAL_ChibiOS: move tto using updated time conversion API 2018-08-03 13:44:59 +10:00
Siddharth Purohit
4e8d072d6d HAL_ChibiOS: move to using recent pal driver api for GPIO IRQ events 2018-08-03 13:44:59 +10:00
Mark Whitehorn
86b7adf68f AP_HAL_Chibios: fix fmuv3/hwdef.dat printf/STDOUT description and clean up 2018-08-03 13:08:37 +10:00
Lucas De Marchi
20778f73f1 AP_HAL_ChibiOS: define HAL_HAVE_SAFETY_SWITCH accordingly 2018-08-02 13:15:02 -07:00
Andrew Tridgell
13f96bcb00 HAL_ChibiOS: fixed an i2c dma callback bug
many thanks to Kelly-Foster for chasing me on this one!
2018-08-02 12:29:02 +10:00
Andrew Tridgell
b0badf8caf HAL_ChibiOS: fixes for F745 builds 2018-08-02 11:56:33 +10:00
Andrew Tridgell
44fd85ff29 HAL_ChibiOS: reduce memory used by serial buffers
this does not appear to affect log download speed. It saves about 27k
of memory
2018-08-01 13:11:16 +10:00
Hwurzburg
19f44f80ad HAL_ChibiOS: Added Omnibus F4 NanoV6 (only V6)
bench tested all ports
2018-07-30 19:32:29 +10:00
Andrew Tridgell
4026b9f49d HAL_ChibiOS: probe all external compasses on mini-pix 2018-07-30 17:26:19 +10:00
Andrew Tridgell
c83567dcba HAL_ChibiOS: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Jonathan Challinger
f5f6220283 AP_HAL_ChibiOS: reflect changes to AP_HAL tonealarm interface 2018-07-30 14:02:12 +10:00
Andrew Tridgell
72ee20c590 HAL_ChibiOS: added RC input for OMNIBUSF7V2 2018-07-30 10:45:55 +10:00
Timothy Knab
d4c19ebc3c HAL_ChibiOS: Updated OMNIBUSF7V2
Compasses on the I2C bus are now detected properly and GPS on UART3 works.
2018-07-30 10:45:55 +10:00
Andrew Tridgell
95aaa01014 HAL_ChibiOS: override COMPASS_AUTO_ROT on several boards 2018-07-28 18:05:12 +10:00
Andrew Tridgell
1eef29e525 HAL_ChibiOS: only set freq on valid IO channels 2018-07-28 15:25:57 +10:00
Andrew Tridgell
2174c53eb6 HAL_ChibiOS: added Pixhawk1 build target
this is more obvious to users than fmuv3
2018-07-27 10:02:31 +10:00
Alexander Malishev
1377943eb3 HAL_ChibiOS: fix DTCM size in stm32f745 mcu 2018-07-26 17:52:37 +10:00
Andrew Tridgell
8a26ca1ddf HAL_ChibiOS: added a DMA reserve heap
this ensures we keep some DMA-capable memory aside for when it is
needed
2018-07-20 15:48:21 +10:00
Siddharth Purohit
f9ab7e54d4 HAL_ChibiOS: increase sigread buffer size for protocols with longer length 2018-07-20 15:47:18 +10:00
Andrew Tridgell
73cfd40e7f HAL_ChibiOS: reduce latency of DMA sharing
if we are sharing a DMA channel between i2c and SPI then this saves
latency on SPI by giving up the DMA channel between retries
2018-07-20 14:51:18 +10:00
Andrew Tridgell
4244daeb2d HAL_ChibiOS: support playing tunes by string 2018-07-20 14:37:16 +10:00
Andrew Tridgell
ec97e7772d HAL_ChibiOS: rename f4by-ch to F4BY 2018-07-18 21:24:11 +10:00
Alexander Malishev
f265d7e128 AP_Bootloader: add f4by bootloader 2018-07-18 21:10:39 +10:00
Andrew Tridgell
caa553e727 HAL_ChibiOS: fixed internal i2c mask for Pixracer 2018-07-18 12:04:01 +10:00
Andrew Tridgell
59aab9987e HAL_ChibiOS: account for I2C base in compass masks 2018-07-18 12:04:01 +10:00
Alexander Malishev
4342dae065 HAL_ChibiOS: define BOARD_RSSI_ANA_PIN to simpify tuning 2018-07-16 08:29:49 +10:00
Alexander Malishev
e04f438ce3 HAL_ChibiOS: fix analog pins on MatekF405 2018-07-16 08:29:49 +10:00
Alexander Malishev
89f7d652e0 HAL_ChibiOS: removed wrong led pin 2018-07-16 08:29:49 +10:00
Andrew Tridgell
9ab55f6838 HAL_ChibiOS: probe for external compasses on several boards
boards that have no internal compass will now probe for all external
compass types
2018-07-14 17:51:50 +10:00
Andrew Tridgell
476bddd9a3 HAL_ChibiOS: use HAL_I2C_INTERNAL_MASK 2018-07-14 17:51:50 +10:00
Andrew Tridgell
7eabee04a3 HAL_ChibiOS: enable OSD on KakuteF7 2018-07-13 14:53:53 +10:00
Andrew Tridgell
b96f24c80e HAL_ChibiOS: added KakuteF7
thanks to Huibean for the fixes!
2018-07-13 14:53:53 +10:00
Andrew Tridgell
f2d602690e HAL_ChibiOS: fixed build error with some compilers 2018-07-13 08:50:46 +10:00
Andrew Tridgell
83f38d536e HAL_ChibiOS: fixed flow control auto-detect without DMA
this fixes automatic flow control detection when we are not using DMA
for TX
2018-07-13 07:34:30 +10:00
Andrew Tridgell
0201893f7c HAL_ChibiOS: fixed peripheral power-up on fmuv5
we need to do the powerup before we initialise the UARTs
2018-07-13 07:34:30 +10:00
Andrew Tridgell
409e857f6b HAL_ChibiOS: use pullup on CTS line
this makes life less difficult for SiK radios which go into bootloader
mode on low CTS
2018-07-13 07:34:30 +10:00
Andrew Tridgell
11e09a846c HAL_ChibiOS: setup RTS pins as pullup
this prevents RTS pins from keeping SiK radios in bootloader mode on
peripheral powerup
2018-07-13 07:34:30 +10:00
Andrew Tridgell
63a0a4979c HAL_ChibiOS: delay peripheral power on for fmuv5
this should prevent SiK radios staying in the bootloader
2018-07-13 07:34:30 +10:00
Michael du Breuil
6fba374069 AP_HAL_ChibiOS: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Andrew Tridgell
f083b80700 HAL_ChibiOS: added preallocation of DMA bouncebuffers
we need 512 bytes for microSD
2018-07-12 14:34:04 +10:00
Andrew Tridgell
e193a161f2 HAL_ChibiOS: enable SDIOv1 bouncebuffers 2018-07-12 14:34:04 +10:00
Andrew Tridgell
f84424cca4 HAL_ChibiOS: added specific builds for the Pixracer and mRoX21 boards 2018-07-12 12:33:32 +10:00
Andrew Tridgell
721f5d86b1 HAL_ChibiOS: fixed mRoX21 IMU setup 2018-07-12 12:33:32 +10:00
Andrew Tridgell
0310bd468c HAL_ChibiOS: changed uart order for KakuteF4
thanks to feedback from Arther
2018-07-12 11:50:10 +10:00
Andrew Tridgell
50f7e55f0b HAL_ChibiOS: don't clear buffers if no baudrate change 2018-07-12 11:41:31 +10:00
fnoop
374c46bd57 HAL_ChibiOS: MatekF405-Wing UART reorder 2018-07-11 16:26:04 -07:00
Andrew Tridgell
1f2c24ef7b HAL_ChibiOS: backup storage to microSD if possible
very useful for diagnostics.

This also fixes a bug on boards with flash storage, to not switch to
microSD storage if flash storage available
2018-07-11 16:38:03 +10:00
fnoop
922a9762df HAL_ChibiOS: Fix MatekF405-Wing default compass rotation 2018-07-11 10:10:34 +10:00
Andrew Tridgell
2d8dbc05d0 HAL_ChibiOS: fixed omnibusf4pro I2C
many thanks to Kelly-Foster and @sh83
2018-07-11 08:33:49 +10:00
Andrew Tridgell
fff4b3b4a0 HAL_ChibiOS: fixed build on some F4 boards 2018-07-11 07:24:39 +10:00
Andrew Tridgell
ece10082e2 HAL_ChibiOS: added separate builds for Pixhawk4 and CUAVv5
this makes it easier to distinguish boards in logs, plus makes life
easier when the user is selecting the right firmware.

It also gives us the flexibility to make parameter changes as needed
2018-07-10 18:29:14 +10:00
Andrew Tridgell
b647dde28f HAL_ChibiOS: changed which I2C bus is internal on fmuv5
match PH4 arrangement
2018-07-10 18:29:14 +10:00
Andrew Tridgell
385713abdd HAL_ChibiOS: support for PH4-mini board 2018-07-10 18:29:14 +10:00
Andrew Tridgell
63a9b903ba HAL_ChibiOS: added fallback to microSD for param storage
useful for boards without flash sectors setup in bootloader for
storage, but can use microSD
2018-07-10 15:41:44 +10:00
Andrew Tridgell
5d8b4c1e23 HAL_ChibiOS: ensure system_id is nul terminated 2018-07-10 15:40:08 +10:00
Andrew Tridgell
4f9bd50038 HAL_ChibiOS: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell
3292abaa19 HAL_ChibiOS: fixed F412 build 2018-07-10 11:48:06 +10:00
Randy Mackay
af6c5ebda1 AP_HAL_ChibiOS: reduce default BRD_PWM_COUNT to 4 for fmv3
also default relay pins to use aux out 5 and 6
2018-07-10 05:30:05 +10:00
Andrew Tridgell
a7d9f4eef7 HAL_ChibiOS: don't add defaults.parm when building bootloader 2018-07-09 20:59:51 +10:00
Andrew Tridgell
fd02865a8b HAL_ChibiOS: use wildcard ROMFS name for fonts 2018-07-09 19:41:56 +10:00
Andrew Tridgell
27c435e217 HAL_ChibiOS: use compressed ROMFS for bootloader update 2018-07-09 19:41:56 +10:00
Andrew Tridgell
a489c93001 HAL_ChibiOS: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell
df3ce87e02 HAL_ChibiOS: implement thread_create() 2018-07-09 19:41:18 +10:00
Andrew Tridgell
847cb760b4 HAL_ChibiOS: fixed fmuv4-beta hwdef for dup pin 2018-07-06 10:21:12 +10:00
Andrew Tridgell
bf6906819d HAL_ChibiOS: fixed configure of cube-red 2018-07-06 10:21:12 +10:00
Alexander Malishev
7a3eb69818 HAL_ChibiOS: allow arm without compass on omnibusf4pro 2018-07-06 09:04:50 +10:00
Andrew Tridgell
fbf24f0492 HAL_ChibiOS: make serial number match HAL_PX4 2018-07-06 09:02:11 +10:00
Andrew Tridgell
840362f355 HAL_ChibiOS: fixed default revo compass orientation 2018-07-05 19:43:12 +10:00
Andrew Tridgell
15ee9593b5 HAL_ChibiOS: fixed duplicate pin definitions
thanks to @liang-tang for noticing
2018-07-05 12:07:55 +10:00
Andrew Tridgell
53dcf5bef8 HAL_ChibiOS: fixed build warning with MATEKF405 2018-07-05 11:48:40 +10:00
Andrew Tridgell
5c2c5efc35 HAL_ChibiOS: rename to CubeYellow 2018-07-05 07:53:48 +10:00
Andrew Tridgell
f289c71b89 HAL_ChibiOS: make CubeOrange IDs consistent with CubeBlack 2018-07-05 07:53:48 +10:00
Andrew Tridgell
47fec1859b HAL_ChibiOS: rename cube-orange to CubeOrange 2018-07-05 07:53:48 +10:00
proficnc
5519986848 HAL_ChibiOS: Added CubeBlack hwdef 2018-07-05 07:53:48 +10:00
Andrew Tridgell
d3bc281a10 HAL_ChibiOS: use generic ROMFS embedding system 2018-07-02 10:43:48 +10:00
Andrew Tridgell
8ba137bd9a waf: moved ROMFS embed script into waf folder 2018-07-02 10:43:48 +10:00
Andrew Tridgell
e5435e02ad HAL_ChibiOS: report system ID in mavlink and logs 2018-06-29 20:27:36 +10:00
Andrew Tridgell
ca3beb88b7 HAL_ChibiOS: allow for telem1 and telem2 for bootloader on fmuv3 2018-06-29 08:17:38 +10:00
Andrew Tridgell
6cf205bdbe HAL_ChibiOS: make sure we populate up to uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell
dd059b89f3 HAL_ChibiOS: added uartG for fmuv4 and fmuv5 2018-06-29 08:17:38 +10:00
Andrew Tridgell
0a5d287326 HAL_ChibiOS: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell
963675689c HAL_ChibiOS: fixed substitution of %BOARD%-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell
54dc67e2a9 HAL_ChibiOS: default bootloader product string to XX-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell
946d0208e5 HAL_ChibiOS: fixed stm32f7 cache bug in erase flash page 2018-06-28 11:35:13 +10:00
Andrew Tridgell
d183efa720 HAL_ChibiOS: fixed USB string of fmuv5 bootloader 2018-06-28 11:35:13 +10:00
Andrew Tridgell
2b7b499c63 HAL_ChibiOS: added support for RTC sig for fast boot 2018-06-28 11:35:13 +10:00
Andrew Tridgell
f7f9d2b0e7 HAL_ChibiOS: added fmuv4 bootloader hwdef-bl.dat 2018-06-28 11:35:13 +10:00
Andrew Tridgell
3a5b3b4b1b HAL_ChibiOS: fixed adding bootloader to ROMFS 2018-06-28 11:35:13 +10:00
Peter Barker
e332bece0f AP_HAL_ChibiOS: embed any bootloader found for a board 2018-06-28 11:35:13 +10:00
Peter Barker
a81b3c8a7c AP_HAL_ChibiOS: specify bootloader for sparky2 2018-06-28 11:35:13 +10:00
Peter Barker
f07b6f3d78 AP_HAL_ChibiOS: add support for flashing bootloader 2018-06-28 11:35:13 +10:00
Andrew Tridgell
10533fb249 HAL_ChibiOS: enable OSD font on OMNIBUSF7V2 2018-06-27 14:55:00 +10:00
Alexander Malishev
79b289f97e HAL_ChibiOS: reverted change in omnibus hwdef.dat 2018-06-27 14:55:00 +10:00
Andrew Tridgell
8e8508a9f3 HAL_ChibiOS: enable OSD for MatekF405 2018-06-27 14:55:00 +10:00
Andrew Tridgell
cf19e7a3ae HAL_ChibiOS: enabled OSD on KakuteF4 2018-06-27 14:55:00 +10:00
Alexander Malishev
8ce7ef1342 HAL_ChibiOS: added OSD support for MatekF405 and Omnibuspro 2018-06-27 14:55:00 +10:00
Andrew Tridgell
35f835a021 HAL_ChibiOS: improved OMNIBUSF7V2 support 2018-06-27 13:01:30 +10:00
Andrew Tridgell
7cce23671a HAL_CbibiOS: removed unnecessary BOARD_SUBTYPE define
just causes build warnings
2018-06-27 11:37:45 +10:00
Andrew Tridgell
5bf078cc86 HAL_ChibiOS: fixed build with -Werror-sign-compare 2018-06-27 11:37:45 +10:00
Michael du Breuil
153ee6ca8e AP_HAL_ChibiOS: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil
037e53ba8a AP_HAL_ChibiOS: Reduce flash space of UARTDriver
Saves 32 bytes
2018-06-26 02:18:18 +01:00
Andrew Tridgell
a0b4553a26 HAL_ChibiOS: fixed bootloader build issue 2018-06-25 21:22:31 +10:00
Andrew Tridgell
bf6fb72904 HAL_ChibiOS: fixed 32 bit flash writes 2018-06-25 21:22:31 +10:00
Andrew Tridgell
f71d2a7417 HAL_ChibiOS: support bootloaders with no uarts 2018-06-25 21:22:31 +10:00
Andrew Tridgell
277836ccc7 HAL_ChibiOS: added bootloader definition for fmuv3
including UART support on 2 UARTs
2018-06-25 21:22:31 +10:00
Andrew Tridgell
e40457d98f HAL_ChibiOS: avoid malloc in usbcfg
this avoids the need for malloc in the bootloader
2018-06-25 21:22:31 +10:00
Andrew Tridgell
369ac5edd0 HAL_ChibiOS: save more space in the bootloader 2018-06-25 21:22:31 +10:00
Andrew Tridgell
e870b5f00a HAL_ChibiOS: use 32 bit flash operations when possible 2018-06-25 21:22:31 +10:00
Andrew Tridgell
feefa05b41 HAL_ChibiOS: expose stm32_flash_ispageerased() 2018-06-25 21:22:31 +10:00
Andrew Tridgell
dd1bd43a2e HAL_ChibiOS: added stm32_flash_keep_unlocked() 2018-06-25 21:22:31 +10:00
Alexander Malishev
95f3eb5ab6 HAL_ChibiOS: stop logging before reboot 2018-06-25 17:46:20 +10:00
Alexander Malishev
cfa18b8e70 HAL_ChibiOS: reduce dataflash buffer size on targets with 128KB ram 2018-06-25 17:43:26 +10:00
Andrew Tridgell
dc0f2f9319 HAL_ChibiOS: use USB for stdout on more boards
don't waste a UART
2018-06-24 08:26:28 +10:00
Andrew Tridgell
2cfdc98453 HAL_ChibiOS: fixed omnibusf4pro bootloader LED pins 2018-06-24 08:26:28 +10:00
Andrew Tridgell
b149089830 HAL_ChibiOS: fixed board IDs and added more bootloaders 2018-06-24 08:26:28 +10:00
Andrew Tridgell
2f8a534243 HAL_ChibiOS: expand param storage on F4 boards with flash storage
this allows for a lot more param space on these boards
2018-06-24 08:26:28 +10:00
Andrew Tridgell
e868a4fe8b HAL_ChibiOS: set FLASH_RESERVE_START_KB in the environment
used to correctly setup an intel hex file
2018-06-23 17:06:38 +10:00
Andrew Tridgell
1c807e0078 HAL_ChibiOS: added option to limit size of bootloader
this will ensure our F4 bootloaders stay under 16k
2018-06-23 17:06:38 +10:00
Andrew Tridgell
e11b3f2f0e HAL_ChibiOS: run CAN thread at 3KHz
at 10KHz we were causing occasional CRC errors on the UART to IOMCU
2018-06-22 08:40:12 +10:00
Andrew Tridgell
d88b710ea9 HAL_ChibiOS: added more bootloader hwdef-bl.dat files 2018-06-22 08:00:31 +10:00
Andrew Tridgell
518d41e0d4 HAL_ChibiOS: added OTP defines 2018-06-22 08:00:31 +10:00
Kelly-Foster
ae84202bf2 HAL_ChibiOS: added MatekF405-Wing hwdef.dat 2018-06-22 08:00:31 +10:00
Andrew Tridgell
14f66461a7 HAL_ChibiOS: shrink build size for bootloader
thanks to @sh83 for the idea
2018-06-22 08:00:31 +10:00
Alexander Malishev
661259de4e HAL_ChibiOS: reduce .text aigment to save flash space 2018-06-22 08:00:31 +10:00
Andrew Tridgell
608490f5ae HAL_ChibiOS: fixed cube-orange bl build 2018-06-22 08:00:31 +10:00
Andrew Tridgell
f9faa0765d HAL_ChibiOS: fixed bootloader IDs 2018-06-22 08:00:31 +10:00
Andrew Tridgell
3fc6824bfb HAL_ChibiOS: setup more bootloader config files 2018-06-22 08:00:31 +10:00
Andrew Tridgell
0cd46c063c HAL_ChibiOS: fixed flash driver for F7
we need a data sync barrier due to the F7 cache
2018-06-22 08:00:31 +10:00
Andrew Tridgell
82428dfbc6 HAL_ChibiOS: added f405-bl hwdef.dat 2018-06-22 08:00:31 +10:00
Andrew Tridgell
3ef88e1b8f HAL_ChibiOS: allow flash support for bootloader 2018-06-22 08:00:31 +10:00
Andrew Tridgell
5216870492 HAL_ChibiOS: avoid strstr in usbcfg
saves nearly 2k of flash
2018-06-22 08:00:31 +10:00
Andrew Tridgell
c12d14d7a4 HAL_ChibiOS: check for ChibiOS features 2018-06-22 08:00:31 +10:00
Andrew Tridgell
03f67d82c9 HAL_ChibiOS: allow more ChibiOS functionality to be disabled
used by bootloader builds for minimal flash size
2018-06-22 08:00:31 +10:00
Andrew Tridgell
e3a23921a2 HAL_ChibiOS: fixed FLASH_LOAD_ADDRESS
needs 0x08000000 base
2018-06-22 08:00:31 +10:00
Andrew Tridgell
1c054f0e4a HAL_ChibiOS: fixed clock line on fmuv5 I2C4
there was a typo in the datasheet
2018-06-21 13:08:20 +10:00
Andrew Tridgell
a8f99882ba HAL_ChibiOS: allow FrSky_INV to be controlled as GPIO
this allows control via relay settings
2018-06-21 07:40:50 +10:00
Andrew Tridgell
e3b68876a9 HAL_ChibiOS: fixed tx_len on tx DMA timeout 2018-06-19 09:08:45 +10:00
Andrew Tridgell
8431a677d9 HAL_ChibiOS: added a timeout to DMA UART TX
this prevents a shared DMA channel being held for a long time if a CTS
pin is held either by not being connected or by a radio
2018-06-19 09:08:45 +10:00
Hyungsub
8ae2729022 AP_HAL_ChibiOS: fix memory leaks
Fixes #8644
2018-06-18 10:30:56 +01:00
Andrew Tridgell
1c4bf3d804 HAL_ChibiOS: fixed build warning 2018-06-15 11:26:40 +10:00
Lucas De Marchi
46213eb97e chibios_hwdef: fix wrong uart index
calling uart_list.index() will find the first element with that name,
which is not really what we want when we have multiple EMPTY uarts.
2018-06-15 08:21:40 +10:00
Andrew Tridgell
00d919018b HAL_ChibiOS: added RTC clock implementation 2018-06-15 08:01:22 +10:00
Andrew Tridgell
10ca1e78e8 HAL_ChibiOS: switched to Mode3 on SPI1
this is now working correctly
2018-06-13 20:05:26 +10:00
Andrew Tridgell
9d248456e4 HAL_ChibiOS: re-enable I2C4 DMA for F765
now we have fixed the error from the datasheet we can do DMA
2018-06-13 20:05:26 +10:00
Andrew Tridgell
ad3eca4e6b HAL_ChibiOS: fixed I2C4 DMA streams
There is an error in the datasheet. See
https://community.st.com/thread/50484-documentation-error-on-dma-channels-for-i2c4-on-stm32f7
2018-06-13 20:05:26 +10:00
Andrew Tridgell
62e8fbb9d3 HAL_ChibiOS: fixed OMNIBUSF7V2 hwdef.dat 2018-06-13 20:05:26 +10:00
Andrew Tridgell
e068106669 HAL_ChibiOS: support I2C devices on STM32F7 without DMA
this allows us to support I2C4 on fmuv5
2018-06-13 20:05:26 +10:00
Alexander Malishev
289b93c3d0 HAL_ChibiOS: added parse_timer to chibios_hwdef.dat 2018-06-11 18:32:17 +10:00
Eugene Shamaev
2055f264e5 AP_HAL_ChibiOS: helper func 2018-06-09 22:46:48 -07:00
Andrew Tridgell
ab946b5d76 HAL_ChibiOS: disable debug code for FMUv5 2018-06-08 09:56:41 +10:00
Philip
2424e38ed2 HAL_ChibiOS: Update cube-orange hwdef.dat for USB IDs 2018-06-08 09:56:41 +10:00
Andrew Tridgell
058e83c180 HAL_ChibiOS: switched cube-orange SPI1 devices to Mode0 2018-06-08 09:56:41 +10:00
Andrew Tridgell
2df0a71a4b HAL_ChibiOS: fixed flash load address in hwdef.h 2018-06-08 09:56:41 +10:00
Andrew Tridgell
3a7c1b4d42 HAL_ChibiOS: switch BMI055 to mode0 on fmuv5 2018-06-08 09:56:41 +10:00
Andrew Tridgell
3be9077ba9 HAL_ChibiOS: added FMUv5 FMU capture pins 2018-06-06 15:01:38 +10:00
Andrew Tridgell
c05086430d HAL_ChibiOS: fixed hwdef.h generation for PWM on tim12 2018-06-06 15:01:38 +10:00
Andrew Tridgell
63087b6425 HAL_ChibiOS: enable fmu out 7 and 8 for fmuv5
these are exposed on the Pixhawk4
2018-06-06 15:01:38 +10:00
Alexander Malishev
eac5d13f1c HAL_ChibiOS: use 2 channels in SoftSigReaderInt.cpp 2018-06-06 08:23:51 +10:00
Alexander Malishev
fd45b3a69b HAL_ChibiOS: slightly increase EICU interrupt priority 2018-06-06 08:23:51 +10:00
Alexander Malishev
73d33356ad HAL_ChibiOS: detect overcapture in SoftSigReaderInt.cpp 2018-06-06 08:23:51 +10:00
Andrew Tridgell
7a1f87eb52 HAL_ChibiOS: added cube-orange hwdef 2018-06-06 08:13:38 +10:00
Michael du Breuil
1123023a6f AP_HAL_ChibiOS: Wrap process registration with a semaphore 2018-06-06 07:16:58 +10:00
Michael du Breuil
a832bdfd04 AP_HAL_ChibiOS: fix race condition on analog reading 2018-06-06 07:16:58 +10:00
Michael du Breuil
4a9fe1745f AP_ChibiOS: Remove timer process suspension interface 2018-06-06 07:16:58 +10:00
Andrew Tridgell
1ed6a9d34b HAL_ChibiOS: added MCU tables for STM32F777 2018-06-06 07:15:41 +10:00
Andrew Tridgell
d1caa86e12 HAL_ChibiOS: adjust DMA priorities for fmuv3 2018-06-06 07:15:41 +10:00
Andrew Tridgell
c273b23940 HAL_ChibiOS: moved MCU config to python database
this moves the key MCU config variables related to memory to the
python MCU database, allowing the hwdef.dat to be considerably simpler
2018-06-06 07:15:41 +10:00
Andrew Tridgell
f390e35c99 HAL_ChibiOS: use port_disable in reboot
this provides a more reliable way to stop all interrupts
2018-06-06 07:15:41 +10:00
Andrew Tridgell
a1c97d0585 HAL_ChibiOS: disable paranoid checks for fmuv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
a945c97ec6 HAL_ChibiOS: fixed 3-way DMA sharing bug
when we have 3 way contention across two DMA streams we could get the
dma_deallocate function called in an object from two places at
once. This adds a mutex that prevents that scenario
2018-06-06 07:15:41 +10:00
Andrew Tridgell
0e09dc75c0 HAL_ChibiOS: flush all memory on chSysHalt()
this makes debugging a lot easier, as gdb can see the values in dcache
2018-06-06 07:15:41 +10:00
Andrew Tridgell
2493cdbcb6 HAL_ChibiOS: switch to new bouncebuffer system
this removes the dma_flush and dma_invalidate methods and uses a
common bouncebuffer system for all CPU types. This enables microSD
support on STM32F7
2018-06-06 07:15:41 +10:00
Andrew Tridgell
0b1e26a470 HAL_ChibiOS: added bouncebuffer system
this makes our bouncebuffers available for ChibiOS system
drivers. This is needed for SDMMCv1 on STM32F7
2018-06-06 07:15:41 +10:00
Andrew Tridgell
56ce3f057d HAL_ChibiOS: added DRDY and SDMMC pins for FMUv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
018c9ad40b HAL_ChibiOS: fixed build warnings 2018-06-06 07:15:41 +10:00
Andrew Tridgell
f25b95f287 HAL_ChibiOS: fixed array length in ADC debug code 2018-06-06 07:15:41 +10:00
Andrew Tridgell
fef1b0ffc6 HAL_ChibiOS: fixed I2C flush/invalidate calls 2018-06-06 07:15:41 +10:00
Andrew Tridgell
0fade4eb9e HAL_ChibiOS: make sure the UART bounce buffers are DMA safe 2018-06-06 07:15:41 +10:00
Andrew Tridgell
eec4a12cc2 HAL_ChibiOS: switched to using DTCM memory for DMA
this uses SRAM1 and SRAM2 for main memory, which enables the use of the
data cache for faster operation, and using DTCM for all DMA operations.
2018-06-06 07:15:41 +10:00
Andrew Tridgell
8b1db792ee HAL_ChibiOS: ensure ADC memory is aligned for DMA access 2018-06-06 07:15:41 +10:00
Andrew Tridgell
bb2e7a189f HAL_ChibiOS: added a debug function for showing stack free
this can be enabled when needed to investigate stack space remaining
2018-06-06 07:15:41 +10:00
Andrew Tridgell
010cd71ab6 HAL_ChibiOS: enable CAN on FMUv5
and fixed voltage scaling defaults
2018-06-06 07:15:41 +10:00
Andrew Tridgell
2087354939 HAL_ChibiOS: align buffers to STM32F7 cache lines
this allows for DMA flush and invalidate operations to work on all
dynamically allocated memory
2018-06-06 07:15:41 +10:00
Andrew Tridgell
762e4f9915 HAL_ChibiOS: fixed dma priorities for fmuv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
77d95f6744 HAL_ChibiOS: fmuv5 tweaks 2018-06-06 07:15:41 +10:00
Andrew Tridgell
a220220758 HAL_ChibiOS: added comment on IS_DMA_SAFE() 2018-06-06 07:15:41 +10:00
Andrew Tridgell
4d4ea894e8 HAL_ChibiOS: disable i2c device debug code 2018-06-06 07:15:41 +10:00
Andrew Tridgell
edb831653f HAL_ChibiOS: added dma_flush and dma_invalidate operations
these are needed to manage the data cache on the STM32F7
2018-06-06 07:15:41 +10:00
Andrew Tridgell
7449e15313 HAL_ChibiOS: disable flash storage option on FMUv5
F7 flash driver not working yet
2018-06-06 07:15:41 +10:00
Andrew Tridgell
b961e12456 HAL_ChibiOS: support having no flash storage option 2018-06-06 07:15:41 +10:00
Andrew Tridgell
2d8748ddce HAL_ChibiOS: enable ADCs and buzzer for fmuv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
6aab9232ef HAL_ChibiOS: enable aux pwm channels on FMUv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
db9bf19e46 HAL_ChibiOS: enable i2c for FMUv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
77bb69fa2e HAL_ChibiOS: enabled UARTs for FMUv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
ac44189ab2 HAL_ChibiOS: setup two IMUs for FMUv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
721f3cd5d1 HAL_ChibiOS: fixed flash layout for F7
thanks to @alielectric
2018-06-06 07:15:41 +10:00
Andrew Tridgell
01f5d1a17c HAL_ChibiOS: first IMU working 2018-06-06 07:15:41 +10:00
Andrew Tridgell
eca634ec62 HAL_ChibiOS: support 6 SPI buses 2018-06-06 07:15:41 +10:00
Andrew Tridgell
4ad757b4d1 HAL_ChibiOS: fixed pincount for F7 2018-06-06 07:15:41 +10:00
Andrew Tridgell
876899c48d HAL_ChibiOS: baro and FRAM working for fmuv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell
8d2f57898b HAL_ChibiOS: adjust pin counts for STM32F7 2018-06-06 07:15:41 +10:00
Andrew Tridgell
1f6ffc48e5 HAL_ChibiOS: allow STM32F7 to build with flash driver 2018-06-06 07:15:41 +10:00
Andrew Tridgell
7c09a1781b HAL_ChibiOS: started on fmuv5 2018-06-06 07:15:41 +10:00
Michael du Breuil
593da25a7a AP_HAL_ChibiOS: Remove RC overrides 2018-06-05 09:51:09 +10:00
Andrew Tridgell
a011561a6a HAL_ChibiOS: support sdcard on MatekF405 2018-05-27 19:10:24 +10:00
Andrew Tridgell
ea37cede28 HAL_ChibiOS: stop sdcard interface on reboot 2018-05-27 19:10:24 +10:00
Andrew Tridgell
86ded2c40c HAL_ChibiOS: cleanup sdcard API usage 2018-05-27 19:10:24 +10:00
Andrew Tridgell
52c8d3ed9f HAL_ChibiOS: fixed SPI select error
changes by sdcard PR
2018-05-27 19:10:24 +10:00
Andrew Tridgell
2c55589488 HAL_ChibiOS: added hwdef for MatekF405 2018-05-27 19:10:24 +10:00
Alexander Malishev
83e65b3c6e HAL_ChibiOS: turn on sdcard on f4by 2018-05-27 19:10:24 +10:00
Alexander Malishev
66de6d770a HAL_ChibiOS: Enable reentrancy on FatFS sybsystem 2018-05-27 19:10:24 +10:00
Alexander Malishev
6b15b2f44f HAL_ChibiOS: Enable sdcard on spi bus 2018-05-27 19:10:24 +10:00
Andrew Tridgell
7b720aae46 HAL_ChibiOS: allow printf() to work on systems without debug console
map to hal.console once initialised
2018-05-26 19:06:25 +10:00
Andrew Tridgell
dbe0f3c575 HAL_ChibiOS: fixed assert in reboot
with asserts enabled we can't sleep with interrupts off
2018-05-26 17:23:46 +10:00
Andrew Tridgell
79ca1e76c0 HAL_ChibiOS: improve reliability of reboot 2018-05-26 15:53:25 +10:00
Andrew Tridgell
7e897c16c0 HAL_ChibiOS: maintain rcout state beyond BRD_PWM_COUNT
allow channels beyond BRD_PWM_COUNT to be sent over SBUS or DShot
distribution
2018-05-26 12:08:54 +10:00
Andrew Tridgell
afb36ec168 HAL_ChibiOS: run can loop much more often
this allows for much higher ESC and servo rates, as it gives more
changes for frames to get out
2018-05-25 13:53:17 +10:00
Michael du Breuil
3a62bca7d0 AP_HAL_ChibiOS: Make redefined pins an error, fix FMUv3 2018-05-25 09:57:18 +10:00
Andrew Tridgell
f3179e7934 HAL_ChibiOS: improved reliability of DShot passthru
thanks to WickedShell for debugging this on his Wraith32 ESCs. We were
truncating the last bit on some BLHeli transfers
2018-05-22 18:59:51 +10:00
Eugene Shamaev
4ab2ff8c81 AP_HAL_ChibiOS: HAL_RCINPUT_WITH_AP_RADIO definition 2018-05-22 08:35:01 +09:00
Andrew Tridgell
89898bae1d HAL_ChibiOS: take account of available bytes in receive_time_constraint_us 2018-05-21 14:53:18 +10:00
Andrew Tridgell
dcd7799ec9 HAL_ChibiOS: fixed DShot output on fixed wing
we need to mark the channels as 'fast' for DShot to enable properly
2018-05-21 13:31:00 +10:00
Andrew Tridgell
8571e59d85 HAL_ChibiOS: fixed SBUS inversion for KakuteF4 2018-05-20 15:50:44 +10:00
Andrew Tridgell
7005383f82 HAL_ChibiOS: implement uart receive timestamp API 2018-05-16 18:49:22 +10:00
mirkix
cb50639e27 AP_HAL_ChibiOS: add STM32F7 UART support 2018-05-15 07:23:56 +10:00
Alexander Malishev
7eb08bbd40 HAL_ChibiOS: Fix inverter on Omnibus F4 V3 2018-05-14 06:06:40 +10:00
Andrew Tridgell
794ebe32e3 HAL_ChibiOS: fixed mixture of oneshot and normal PWM on IOMCU 2018-05-12 07:28:05 +10:00
Michael du Breuil
72a4846f40 AP_HAL_ChibiOS: Remove set_overrides() method 2018-05-11 12:13:39 +01:00
mirkix
34c96c80ff AP_HAL_ChibiOS: rename BUZZER_PIN into HAL_BUZZER_PIN 2018-05-10 17:48:25 +01:00
Peter Barker
b2a81405ea AP_HAL_ChibiOS: move delay callback handling to base HAL Scheduler class 2018-05-09 16:15:38 +10:00
anbello
5b56887428 Changes to be committed:
modified:   hwdef.dat

Modified as per @sh83 hints
2018-05-08 07:33:19 +10:00
anbello
93f551e56e define for AirbotF4 board (ChibiOS HAL)
modified:   libraries/AP_HAL/AP_HAL_Boards.h
	new file:   libraries/AP_HAL_ChibiOS/hwdef/airbotf4/hwdef.dat
2018-05-08 07:33:19 +10:00
Alexander Malishev
776d5e6ba3 HAL_ChibiOS: Fixed s-bus signal polarity in SoftSigReaderInt.cpp 2018-05-07 11:46:35 +10:00
Andrew Tridgell
dcab51801c HAL_ChibiOS: implement boost_end
this fixes problems with main thread priority and SPI bus delays on
fmuv3
2018-05-05 07:45:53 +10:00
Andrew Tridgell
5854ccbb4c HAL_ChibiOS: removed stray debug code
thanks to @alielectric for noticing
2018-05-03 17:04:14 +10:00
Andrew Tridgell
2684f46641 HAL_ChibiOS: fixed IMU orientation for revo-mini 2018-04-30 08:33:39 +10:00
mirkix
c2eee2db23 AP_HAL_ChibiOS: add STM32F7 I2C support 2018-04-29 07:59:52 +10:00
Alexander Malishev
1fd52c4e01 HAL_ChibiOS: added input capture filter 2018-04-28 07:31:58 +10:00
Alexander Malishev
0d6043e0c6 HAL_ChibiOS: Fixed current and voltage sense on OmnibusF4PRO 2018-04-26 07:57:06 +10:00
Andrew Tridgell
f75dea34e1 HAL_ChibiOS: fixed integer promotion bug in SoftSigReaderInt
this caused corrupted PPM values. Many thanks to Andrea Belloni for reporting
2018-04-25 22:25:26 +10:00
Andrew Tridgell
bba8d506d6 HAL_ChibiOS: port for kakutef4 flight board 2018-04-24 08:03:46 +10:00
Andrew Tridgell
95108a2d2c HAL_ChibiOS: added support for 16 bit timers 2018-04-24 08:03:46 +10:00
Alexander Malishev
03d88b01be HAL_ChibiOS: added support for interrupt based rcin parsing 2018-04-24 08:03:46 +10:00
malcolm churn
7718196838 HAL_ChibiOS: Fix sparky2 target.
Correct pin mappings, ADC, PWM.

Not working
Flash memory, Logging, external i2c tested with NXP MAG3110.
2018-04-22 21:01:14 +10:00
Peter Barker
557f8cee43 AP_HAL_ChibiOS: add mode-change-beeps 2018-04-19 09:29:41 +10:00
mirkix
79f3fd532b AP_HAL_ChibiOS: fix spi clock calculation 2018-04-19 08:32:31 +10:00
Andrew Tridgell
bb0cbd15a4 HAL_ChibiOS: implement fmuv4 safety state
and added safety_mask and safety_pwm support for both fmuv3 and fmuv4
2018-04-17 10:14:01 +10:00
Andrew Tridgell
77c922e6b8 HAL_ChibiOS: make embed.py work with python3 2018-04-17 08:44:44 +10:00
Andrew Tridgell
3749480dd8 HAL_ChibiOS: create ap_romfs_embedded.h
use ROMFS keywork for romfs files
2018-04-17 08:44:44 +10:00
Alexey Kozin
f87cc4e172 f4by chibios new style dma table build fix 2018-04-16 07:50:34 +10:00
Andrew Tridgell
4871bbf403 HAL_ChibiOS: make soft serial for RC serial more efficient
using system ticks halves the IRQ time
2018-04-16 07:40:55 +10:00
mirkix
a9449ccd29 AP_HAL_ChibiOS: add f767-min board support 2018-04-15 07:40:46 +10:00
Michael du Breuil
8374c5a4f3 AP_HAL_ChibiOS: Remove unused priority level 2018-04-15 07:28:20 +10:00
kozinalexey
2316fee279 HAL_ChibiOS: f4by conf2 fixed ram size, ext compass, pwm count 2018-04-14 11:09:34 +10:00
Alexander Malishev
ca33ff04d9 ChibiOS: add support for omnibusf4pro board 2018-04-14 09:25:15 +10:00
Alexander Malishev
79b5719419 ChibiOS: add support for complementry output timer channels 2018-04-14 09:25:15 +10:00
Alexander Malishev
1b7eecdf2f ChibiOS: fixed tables for F405 mcu 2018-04-14 09:25:15 +10:00
mirkix
8074361bb8 AP_HAL_ChibiOS: add hardware def for STM32F767xx 2018-04-12 14:19:40 +10:00
Andrew Tridgell
c6d7691667 HAL_ChibiOS: fixed F745 database for new DMA system 2018-04-12 11:50:44 +10:00
Andrew Tridgell
7286ffab77 HAL_ChibiOS: define FLASH_LOAD_ADDRESS in hwdef.h
used for bootloader support
2018-04-12 11:50:44 +10:00
Andrew Tridgell
e4ce2f532b HAL_ChibiOS: make smaller builds possible
this allows for much smaller builds when you disable a lot of
options. This is part of an effort to create a bootloader of less than
16k using ChibiOS
2018-04-12 11:50:44 +10:00
Andrew Tridgell
ef9d9d9c26 HAL_ChibiOS: first boot of OMNIBUSF7V2
only the 20608 works, and it has lots of errors.
The bmp280 is detected, but does not give good data
no UARTs yet
2018-04-12 11:50:44 +10:00
Andrew Tridgell
02f20b4114 HAL_ChibiOS: first version of OMNIBUSF7V2 board support
first F7 based board
2018-04-12 11:50:44 +10:00
Andrew Tridgell
a9edbb6b2d HAL_ChibiOS: allow for a defaults.parm file in hwdef directory
this keeps defaults with the board, where that is appropriate
2018-04-12 11:50:44 +10:00
Andrew Tridgell
6e5cbc7c3d HAL_ChibiOS: initial support for F745 boards 2018-04-12 11:50:44 +10:00
Andrew Tridgell
551dca63e1 HAL_ChibiOS: added build information for each MCU
this abstracts the build information for each MCU, so that hwdef.dat
can control the build process of ChibiOS
2018-04-12 11:50:44 +10:00
Andrew Tridgell
d1e4185817 HAL_ChibiOS: don't build flash.c if not needed 2018-04-12 11:50:44 +10:00
Andrew Tridgell
cdbbceb6b6 HAL_ChibiOS: cope with SDMMC peripheral for microSD 2018-04-12 11:50:44 +10:00
Andrew Tridgell
751024f483 HAL_ChibiOS: mark two skyviper builds as needing abin files 2018-04-11 15:09:49 +10:00
Mark Whitehorn
960e217e79 AP_HAL_Chibios: fix latent bug in ToneAlarm 2018-04-10 21:48:16 +10:00
Andrew Tridgell
f2df171fdd HAL_ChibiOS: fixed DSM input on fmuv4 2018-04-10 17:22:21 +10:00
Andrew Tridgell
96cc657bd0 HAL_ChibiOS: fixed GPIO interrupt port mapping 2018-04-09 15:32:04 +10:00
Andrew Tridgell
b4aeffbaed HAL_ChibiOS: added power status flags reporting 2018-04-09 15:32:04 +10:00
Andrew Tridgell
7c85d06600 HAL_ChibiOS: setup pwm counts, and cleanup mindpx-v2 PWM lines 2018-04-09 15:32:04 +10:00
Andrew Tridgell
1b9cebc3f2 HAL_ChibiOS: check pwm count in rcout init 2018-04-09 15:32:04 +10:00
Andrew Tridgell
68293c9c11 HAL_ChibiOS: don't require GPIO() markers on PWM outputs
this fixes blheli pass-thru on MindPX-v2
2018-04-09 15:32:04 +10:00
Andrew Tridgell
eb6c852ee3 HAL_ChibiOS: use simpler pullup on serial input
this maps to the right bits for each MCU type
2018-04-07 09:10:29 +10:00
Andrew Tridgell
71cd58cc7e HAL_ChibiOS: run rc serial thread at top priority
this maximises reliability for serial IO to ESCs, increasing flashing
reliability
2018-04-07 09:10:29 +10:00
Andrew Tridgell
3cd4f2a002 AP_ChibiOS: handle oneshot125 separately
this sets up oneshot125 with the full 1000 steps of throttle
resolution, using a 8MHz clock. This matches the behaviour of modern
ESCs that measure PWM values with high accuracy
2018-04-07 09:10:29 +10:00
Andrew Tridgell
67993d6e5c HAL_ChibiOS: re-instate priority boost system
this adds back in the priority boost system for the main thread when
waiting for a IMU sample. This significantly improves scheduling
performance on very busy boards like a PH2.1
2018-04-07 09:10:29 +10:00
Andrew Tridgell
2c6e6e3b13 HAL_ChibiOS: removed obsolete DShot example code 2018-04-07 09:10:29 +10:00
Andrew Tridgell
9b22e0b7cc HAL_ChibiOS: fixed SPI rates on fmuv3
this fixes a SPI bandwidth issue on PH2.1 with 3 IMUs active
2018-04-07 09:10:29 +10:00
Andrew Tridgell
8e59f6aad6 HAL_ChibiOS: implement get_esc_scaling() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
a2eec97325 HAL_ChibiOS: raised default SPI priority
this was causing transfer errors on the primary IMU of a PH2.1 when
fast sampling was enabled
2018-04-07 09:10:29 +10:00
Andrew Tridgell
5bfc97f9c0 HAL_ChibiOS: fixed dshot trigger while serial active 2018-04-07 09:10:29 +10:00
Andrew Tridgell
e448b5d069 HAL_ChibiOS: implement UART port locking 2018-04-07 09:10:29 +10:00
Andrew Tridgell
6fd0af11ef HAL_ChibiOS: implement telem request API 2018-04-07 09:10:29 +10:00
Andrew Tridgell
751c3a554a HAL_ChibiOS: added fmuv4-beta hardware definition
for an old pixracer quad I have (and I believe Peter has one too)
2018-04-07 09:10:29 +10:00
Andrew Tridgell
6bdb523630 HAL_ChibiOS: guarantee 1kHz output for DShot 2018-04-07 09:10:29 +10:00
Andrew Tridgell
692f22c17f HAL_ChibiOS: added GPIO assignments for revo-mini 2018-04-07 09:10:29 +10:00
Andrew Tridgell
ef539d4145 HAL_ChibiOS: added debug timing option for RCOut 2018-04-07 09:10:29 +10:00
Andrew Tridgell
af1e3aa64d HAL_ChibiOS: increase timeout on bytes for blheli 2018-04-07 09:10:29 +10:00
Andrew Tridgell
756c0d4b0b HAL_ChibiOS: fixed reset for oneshot
after a BLHeli connection we need to go back to 1Hz on timer
2018-04-07 09:10:29 +10:00
Andrew Tridgell
9a29c6d3b5 HAL_ChibiOS: implement DigitalSource() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
51c40a013b HAL_ChibiOS: added IRQ save/restore to hal.scheduler
these are used by RPM driver
2018-04-07 09:10:29 +10:00
Andrew Tridgell
019049e76b HAL_ChibiOS: fixed RC period setting 2018-04-07 09:10:29 +10:00
Andrew Tridgell
d258eac88d HAL_ChibiOS: fixed reconfig of group after serial_end() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
46c76c3d5d HAL_ChibiOS: increase serial byte timeout
needs 2ms for final ack in verify
2018-04-07 09:10:29 +10:00
Andrew Tridgell
202a7dd091 HAL_ChibiOS: don't allow dshot while serial active 2018-04-07 09:10:29 +10:00
Andrew Tridgell
b350b07593 HAL_ChibiOS: allow internal GPIO fuctions to use disabled pins 2018-04-07 09:10:29 +10:00
Andrew Tridgell
67bae2669b HAL_ChibiOS: enable serial5 on fmuv3 2018-04-07 09:10:29 +10:00
Andrew Tridgell
382772d999 HAL_ChibiOS: initial support for ESC serial output 2018-04-07 09:10:29 +10:00
Andrew Tridgell
26d279e165 HAL_ChibiOS: improve DShot timing accuracy 2018-04-07 09:10:29 +10:00
Andrew Tridgell
93111dc0b1 HAL_ChibiOS: ensure that IO UART gets DMA 2018-04-07 09:10:29 +10:00
Andrew Tridgell
95a261e061 HAL_ChibiOS: don't generate DMA channels for ALARM pin 2018-04-07 09:10:29 +10:00
Andrew Tridgell
01e9c55721 HAL_ChibiOS: fixed SPI bus speed on SPI3
and add optional bootup test of SPI bus speeds to help with porting to
new MCUs
2018-04-07 09:10:29 +10:00
Andrew Tridgell
610a6a6c88 HAL_ChibiOS: optimise USB config driver 2018-04-07 09:10:29 +10:00
Andrew Tridgell
bc32276966 HAL_ChibiOS: support DShot output
use DMAR burst DMA to minimise number of DMA channels needed

thanks to betaflight for the great reference implementation!
2018-04-07 09:10:29 +10:00
Andrew Tridgell
294aac6955 HAL_ChibiOS: fixed CTS pulldown
we need to pulldown to prevent delays in uart sends
2018-04-07 09:10:29 +10:00
Andrew Tridgell
a64819cbf2 HAL_ChibiOS: minimise DMA TX latency on contended UARTs
try to prevent long delays on other users of a DMA channel
2018-04-07 09:10:29 +10:00
Andrew Tridgell
a86e85c6b2 HAL_ChibiOS: enable checking for DMA contention 2018-04-07 09:10:29 +10:00
Andrew Tridgell
64278f07d3 HAL_ChibiOS: removed the DMA channels from RCIN in hwdef.dat
no longer needed as this is automatic now
2018-04-07 09:10:29 +10:00
Andrew Tridgell
9a5df6d1f7 HAL_ChibiOS: auto-generate DMA channels for RCIN
and add DMA channels for TIMx_UP ready for DMAR based DShot support
2018-04-07 09:10:29 +10:00
Andrew Tridgell
6aff7ecbf5 HAL_ChibiOS: added channel numbers for STM32F4xx MCUs 2018-04-07 09:10:29 +10:00
Andrew Tridgell
da2e79130b HAL_ChibiOS: generate channel numbers in DMA tables 2018-04-07 09:10:29 +10:00
Andrew Tridgell
3501763f4e HAL_ChibiOS: added DShot example app 2018-04-07 09:10:29 +10:00
Tom Pittenger
b864cd6ae6 AP_HAL_ChibiOS: include correct wrappers 2018-04-03 08:27:44 +10:00
Andrew Tridgell
c311599e0a HAL_ChibiOS: make DEFAULT_PARAMETERS relative to source root 2018-03-24 16:12:10 +11:00
kozinalexey
5df2b1a3ac chibios hal config for F4BY 2018-03-24 06:39:09 +11:00
Peter Barker
2efd9341cd AP_HAL_ChibiOS: copy the common linker script to outdir, use it from there
The directory we write the linker script to might not have the correct relative path to reference this common.ld script.  So make it reference common.ld in the current directory and copy common.ld to the output directory
2018-03-23 11:06:24 +11:00
Andrew Tridgell
fd6185be0f HAL_ChibiOS: fixed python3 pickle error 2018-03-05 09:50:27 +11:00
Andrew Tridgell
961a97a8c9 HAL_ChibiOS: expand docs on STDOUT_SERIAL 2018-03-02 21:46:23 +11:00
Andrew Tridgell
0cd6c9e5fb HAL_ChibiOS: added commented block on enable debug for builds 2018-03-02 21:39:38 +11:00
Andrew Tridgell
556f3ba53f HAL_ChibiOS: make UARTs non-blocking by default
we never want blocking ports any more with ArduPilot, so defaulting to
blocking makes no sense
2018-03-02 21:39:38 +11:00
Andrew Tridgell
33dd14b8d9 HAL_ChibiOS: use PULLUP on UART TX/RX lines
this can prevent spurious bytes on disconnected pins
2018-03-02 21:39:38 +11:00
Andrew Tridgell
91c741ef07 HAL_ChibiOS: use a non-blocking lock for UART shared DMA
we can have multiple UARTs on the same thread sharing the same DMA TX
channel. That can lead to deadlock with blocking locks on DMA. This
makes UART requests for DMA locks non-blocking to fix the issue
2018-03-02 21:39:38 +11:00
Andrew Tridgell
08634903c8 HAL_ChibiOS: use relative path for common.ld
this avoids a path length issue under cygwin
2018-03-02 17:11:31 +11:00
Andrew Tridgell
9ab695b7ca HAL_ChibiOS: fixed namespace error
thanks to Peter for noticing
2018-03-02 17:11:31 +11:00
Andrew Tridgell
153ad95398 HAL_ChibiOS: added hwdef.dat for minimal F405 and F427 boards 2018-03-02 12:52:50 +11:00
Andrew Tridgell
306d35655e HAL_ChibiOS: allow for bare board builds
this allows for a build with no UARTs, no SPI, no I2C, no PWM. Great
for initial board bringup with just USB
2018-03-02 12:52:50 +11:00
Andrew Tridgell
74ed19f460 HAL_ChibiOS: moved more board setup into hwdef.dat 2018-03-02 12:52:50 +11:00
Andrew Tridgell
ebbd15ea17 HAL_ChibiOS: auto-enable CAN when pins are defined 2018-03-02 12:52:50 +11:00
Andrew Tridgell
d84c487a60 HAL_ChibiOS: generate env.py from hwdef.dat
allowing for environment override in hwdef.dat
2018-03-02 12:52:50 +11:00
Andrew Tridgell
5f353b5c85 HAL_ChibiOS: fixed build of I2C without I2C1 defined 2018-03-02 12:52:50 +11:00
Andrew Tridgell
6b6c35a435 waf: use relative paths for ChibiOS build
this fixes the ChibiOS build on cygwin by reducing path lengths to
below the cygwin limit
2018-03-02 12:52:50 +11:00
Andrew Tridgell
21951243f0 HAL_ChibiOS: default debug checks off
these can be enabled as needed for board bringup, but are too
expensive for general use
2018-03-02 12:52:50 +11:00
Andrew Tridgell
0cf104f2f3 HAL_ChibiOS: added scale_esc_to_unity()
needed for per-motor compass cal
2018-03-02 12:52:50 +11:00
Andrew Tridgell
21d401e844 HAL_ChibiOS: fixed compass orientation for revo-mini 2018-03-02 12:52:50 +11:00
Andrew Tridgell
46c3308964 HAL_ChibiOS: enable mag on crazyflie2 2018-03-02 12:52:50 +11:00
Andrew Tridgell
d5fc1ff3d4 HAL_ChibiOS: fixed crazyflie motor order 2018-03-02 12:52:50 +11:00
Andrew Tridgell
7e8ceb1121 HAL_ChibiOS: define ALLOW_ARM_NO_COMPASS 2018-03-02 12:52:50 +11:00
Andrew Tridgell
e05bac425f HAL_ChibiOS: setup crazyflie2 IMU and baro 2018-03-02 12:52:50 +11:00
Andrew Tridgell
9e84c45035 HAL_ChibiOS: dynamically create name for bus threads 2018-03-02 12:52:50 +11:00
Andrew Tridgell
312bde54b4 HAL_ChibiOS: added fmuv2 build for 1M flash boards 2018-03-01 15:25:55 +11:00
Francisco Ferreira
e4382c2232 AP_HAL_ChibiOS: fix CAN thread name 2018-02-28 11:37:55 +09:00
Andrew Tridgell
2581965669 HAL_ChibiOS: fixed mini-pix IMU orientation 2018-02-26 19:16:24 +11:00
Andrew Tridgell
11cfa5fd01 HAL_ChibiOS: correct LSM9DS0 bus IDs to match HAL_PX4 2018-02-19 15:49:32 +11:00
Andrew Tridgell
4d0c3b6581 HAL_ChibiOS: added pixartPC15 SPI device for SPI01 2018-02-14 18:27:00 +11:00
Andrew Tridgell
c4445a7dfd AP_HAL_ChibiOS: initial hwdef for crazyflie2 2018-02-14 18:27:00 +11:00
Andrew Tridgell
a6e0bb4ed0 HAL_ChibiOS: fixed uart order for revo-mini
and setup right battery pins
2018-02-14 18:27:00 +11:00
Andrew Tridgell
17b3607aa8 HAL_ChibiOS: fixed RCIN on revo-mini
this also adds an attempt at using 'N' (inverted) channels for
RCIN. This doesn't work yet, but would be better for the revo-mini, as
it would allow the normal RCIN pin to be used
2018-02-14 18:27:00 +11:00
Andrew Tridgell
c6879c679a HAL_ChibiOS: re-enable USART1 on revo-mini 2018-02-14 18:27:00 +11:00
Andrew Tridgell
427e00dd41 HAL_ChibiOS: switched to system timer for AP_HAL::micros()
this uses the ChibiOS system timer instead of a separate GPT timer for
the core ChibiOS timer. The advantage is it saves us a timer, plus it
changes ChibiOS to use a 1MHz clock on its timer, which gives us
higher resolution for delays.

This has a remarkable effect on timing jitter, reducing it greatly
2018-02-14 18:27:00 +11:00
Andrew Tridgell
f357eec78b HAL_ChibiOS: added more comments in hwdef.dat 2018-02-14 18:27:00 +11:00
Andrew Tridgell
9a95737d7d HAL_ChibiOS: added lots of comments to FMUv3 hwdef.dat
this should help for developers of new boards
2018-02-14 18:27:00 +11:00
Andrew Tridgell
a057498e0c HAL_ChibiOS: pull PA9 PA10 high on revo-mini
needed for correct operation of USB
2018-02-14 18:27:00 +11:00
Andrew Tridgell
66608e8cad HAL_ChibiOS: improved mini-pix support 2018-02-14 18:27:00 +11:00
ljwang
9b99a0ce55 AP_HAL_ChibiOS: fixed mini-pix hwdef.dat 2018-02-14 18:27:00 +11:00
Andrew Tridgell
c3f8d5580a HAL_ChibiOS: undef log directory for skyviper-v2450 2018-02-14 07:39:27 +11:00
Andrew Tridgell
b7c4dea9d3 HAL_ChibiOS: gain back 250usec in loop time
if we have already called delay_microseconds_boost() then we know
we've given up time to drivers, so we can avoid the extra delay in the
HAL
2018-02-13 17:15:05 +11:00
Mark Whitehorn
da69832140 AP_HAL_ChibiOS: add #ifdef around toneAlarm thread stack declaration 2018-02-13 07:27:02 +11:00
Mark Whitehorn
59b2d44323 AP_HAL_ChibiOS: make ToneAlarm compilation conditional on presence of
alarm pin
2018-02-11 14:55:23 +11:00
Mark Whitehorn
d569e35a0f AP_HAL_ChibiOS: add toneAlarm support for ChibiOS on MindPX-v2 2018-02-11 14:55:23 +11:00
Mark Whitehorn
6baad37e47 AP_HAL_ChibiOS: add ICM208060-am to SPI device table in fmuv3/hwdef.dat 2018-02-11 14:55:23 +11:00
Mark Whitehorn
13c54c0543 AP_HAL_ChibiOS: add missing declaration in chibios_hwdef.py 2018-02-11 14:55:23 +11:00
Mark Whitehorn
3a40ba1d3e AP_HAL_ChibiOS: add buzzer support to hwdef.dat for fmuv3 2018-02-11 14:55:23 +11:00
Mark Whitehorn
fb142422f6 AP_HAL_ChibiOS: pull ALARM_CHANNEL into pwmGroup
and improve formatting of HAL_PWM_ALARM in hwdef.h
2018-02-11 14:55:23 +11:00
Mark Whitehorn
8b216cf182 AP_HAL_ChibiOS: add ToneAlarm thread
fmuv4 hwdef.dat: remove PWM label from buzzer output pin
                 add buzzer pin labeled ALARM
                 remove timer PWM from HAL_PWM_GROUPs
2018-02-11 14:55:23 +11:00
Andrew Tridgell
10f940c8d0 HAL_ChibiOS: adjust RCIN pin settings for fmuv4
thanks to Mark for this change
2018-02-09 10:14:53 +11:00
Andrew Tridgell
9301e4888a HAL_ChibiOS: make not having bus lock a soft error
this is nicer for driver developers
2018-02-09 10:14:49 +11:00
Andrew Tridgell
2b86c0e962 HAL_ChibiOS: tweak DMA settings for skyviper-v2450
this resolves a problem with the cypress radio.

Thanks to Sid for working this out
2018-02-08 22:15:41 +11:00
Andrew Tridgell
8226530610 HAL_ChibiOS: added DMA_PRIORITY and DMA_NOSHARE options
this allows finer grained control of DMA streams
2018-02-08 22:13:00 +11:00
Andrew Tridgell
507fcb0f27 Tools: moved make_abin.sh into Tools/scripts
will be used in px4 build
2018-02-08 18:56:51 +11:00
Andrew Tridgell
4ce0c2c827 HAL_ChibiOS: simplify skyviper-v2450 config
remove unused peripherals
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b90c0d78f3 HAL_ChibiOS: fixed build warning 2018-02-08 17:36:33 +11:00
Andrew Tridgell
8eff43a352 HAL_ChibiOS: fixed printf arguments 2018-02-08 17:36:33 +11:00
Andrew Tridgell
aee6462deb HAL_ChibiOS: enable I2C clearing on F412 board only
may be needed on other boards in the future, but for now we only know
its needed on an I2C 20789, which is rare
2018-02-08 17:36:33 +11:00
Siddharth Purohit
40142e5aef ChibiOS: implement way to clear i2c bus by toggling clock line 2018-02-08 17:36:33 +11:00
Andrew Tridgell
0d089e8116 HAL_ChibiOS: fixed F412 OF reset pin 2018-02-08 17:36:33 +11:00
Andrew Tridgell
3c3389a005 HAL_ChibiOS: raise I2C bus priority on F412
needed for good scheduling with I2C IMU
2018-02-08 17:36:33 +11:00
Andrew Tridgell
20a008c80a HAL_ChibiOS: disable trace buffers
these were unusued but still allocated
2018-02-08 17:36:33 +11:00
Andrew Tridgell
875008f2a6 HAL_ChibiOS: lock all DMA channels on reboot
this fixes a problem with the ICM-20789 on I2C where a reboot while the bus is active
leaves the IMU in a dead state where it can't be recovered without a power cycle.
2018-02-08 17:36:33 +11:00
Andrew Tridgell
6faace278a HAL_ChibiOS: run i2c at 400kHz on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
9f53ae1ea4 HAL_ChibiOS: added F412-rev1 hwdef.dat 2018-02-08 17:36:33 +11:00
Andrew Tridgell
47ce37f463 HAL_ChibiOS: report I2C clock downgrades 2018-02-08 17:36:33 +11:00
Andrew Tridgell
73418519eb HAL_ChibiOS: enable analog debug on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
fd824e6258 HAL_ChibiOS: enable toy mode on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
d208dc69d3 Tools: moved make_abin.sh into ChibiOS scripts 2018-02-08 17:36:33 +11:00
Andrew Tridgell
4aa604a193 HAL_ChibiOS: enable pixartflow on skyviper-V2450 2018-02-08 17:36:33 +11:00
Andrew Tridgell
591e0c2249 HAL_ChibiOS: allow control of interrupt port
F412 has radio IRQ on port B
2018-02-08 17:36:33 +11:00
Andrew Tridgell
3cacb1d4b5 HAL_ChibiOS: commented the motor order in hwdef 2018-02-08 17:36:33 +11:00
Andrew Tridgell
f3f6972fc0 HAL_ChibiOS: output panics on system console 2018-02-08 17:36:33 +11:00
Andrew Tridgell
75226ba187 HAL_ChibiOS: enable logging on MindPX-v2
not working yet, seems to be a problem with SDIO interface
2018-02-07 20:33:45 +11:00
Andrew Tridgell
4548fd4d2f HAL_ChibiOS: changed RCIN to PULLDOWN
this fixes a high cpu load with no receiver connected
2018-02-07 20:33:45 +11:00
Andrew Tridgell
86189393a7 HAL_ChibiOS: fixed build warnings 2018-02-07 20:33:45 +11:00
Andrew Tridgell
4886ffbf8a HAL_ChibiOS: fixed build warnings 2018-02-07 20:33:45 +11:00
Andrew Tridgell
30e4323c6d HAL_ChibiOS: disable USART1 till USB problem solved
using USART1 causes USB disconnects. The behaviour is like CTS/RTS is
enabled on USART1, but it is disabled.
2018-02-07 20:33:45 +11:00
Andrew Tridgell
d0eb2970c7 HAL_ChibiOS: ensure RTS and CTS are both disabled for no flow control 2018-02-07 20:33:45 +11:00
Andrew Tridgell
82f1f462ae HAL_ChibiOS: ensure we don't init a uart driver twice 2018-02-07 20:33:45 +11:00
Andrew Tridgell
ad5a04fc89 HAL_ChibiOS: added NODMA option
this allows a peripheral to be configured without DMA (for low-use
UARTs)
2018-02-07 20:33:45 +11:00
Andrew Tridgell
74f4d5a3c9 HAL_ChibiOS: push MPU6500 to 4MHz on mindpx-v2 2018-02-07 20:33:45 +11:00
Andrew Tridgell
f1ce321a2f HAL_ChibiOS: added checking of bus owner
this ensures all bus transfers are only done by the thread that owns
the semaphore
2018-02-07 20:33:45 +11:00
Andrew Tridgell
fa68210210 HAL_ChibiOS: fixed build with older compilers 2018-02-07 20:33:45 +11:00
Andrew Tridgell
626632989e HAL_ChibiOS: fixed build for boards with no USB 2018-02-07 20:33:45 +11:00
Andrew Tridgell
41758348e5 HAL_ChibiOS: added checking of lock state in shared_dma
and use lock around check for tx completion in UART handler
2018-02-07 20:33:45 +11:00
Andrew Tridgell
dce4c90467 HAL_ChibiOS: moved UART thread to UART driver
use an event model for triggering sends from tx complete DMA handler
for unbuffered uarts
2018-02-07 20:33:45 +11:00
Andrew Tridgell
5fc12f82fb HAL_ChibiOS: expanded interrupt stack to 256
this is very conservative, and may be trimmed later based on analysis
of stack usage
2018-02-07 20:33:45 +11:00
Andrew Tridgell
aae1cc22f4 HAL_ChibiOS: updated USB device strings
use defaults or add in serial number
2018-02-07 20:33:45 +11:00
Andrew Tridgell
4b8bde746e HAL_ChibiOS: improved default USB strings
use board name and serial number to make IDs unique
2018-02-07 20:33:45 +11:00
Andrew Tridgell
23e1b2e271 HAL_ChibiOS: added paranoid state checking on I2C
this is here just while debugging an issue with Mark
2018-02-07 20:33:45 +11:00
Andrew Tridgell
7e19f49e42 HAL_ChibiOS: fixed DMA lock in SoftSigReader 2018-02-07 20:33:45 +11:00
Andrew Tridgell
1aa6a0068a HAL_ChibiOS: fixed order of I2C DMA
this was harmless, but confusing for debugging
2018-02-07 20:33:45 +11:00
Andrew Tridgell
111e5b6268 HAL_ChibiOS: change USB ID for revo-mini 2018-02-07 20:33:45 +11:00
Andrew Tridgell
4d018cf5e2 HAL_ChibiOS: take lock on DMA allocate/deallocate
this is required for the stm32_dma_stream bitmask manipulation
2018-02-07 20:33:45 +11:00
Andrew Tridgell
bc49c0d2c5 HAL_ChibiOS: make hwdef.h the same on python2 and python3
and output to /tmp by default to prevent accidental use of old hwdef.h
in the build
2018-02-07 20:33:45 +11:00
Andrew Tridgell
e002fbdb8d HAL_ChibiOS: fixed a build warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell
077aa24c6d HAL_ChibiOS: add more pins for revo-mini port 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e91144cc8e HAL_ChibiOS: allow for empty UART drivers
allows for boards with no default GPS port
2018-02-07 20:33:45 +11:00
Andrew Tridgell
e0212ebe85 HAL_ChibiOS: cope with ETR timer channels
trean the ETR capability as a separate AF
2018-02-07 20:33:45 +11:00
Andrew Tridgell
c1df2a8a4b HAL_ChibiOS: cope with timers 10 and later 2018-02-07 20:33:45 +11:00
Andrew Tridgell
d191b37520 HAL_ChibiOS: cope with having no ADC inputs 2018-02-07 20:33:45 +11:00
Andrew Tridgell
87389e0fdc HAL_ChibiOS: fixed double DMA allocation on i2c 2018-02-07 20:33:45 +11:00
Andrew Tridgell
19e1349d0a HAL_ChibiOS: setup serial5 for fmuv3 ESP8266 2018-02-07 20:33:45 +11:00
Andrew Tridgell
560948dc69 HAL_ChibiOS: fixed GPIOs for ESP8266 port 2018-02-07 20:33:45 +11:00
Andrew Tridgell
fa96e23552 HAL_ChibiOS: setup correct volt and current pins
use hwdef.dat to specify battery pins
2018-02-07 20:33:45 +11:00
Andrew Tridgell
85acbcb21d HAL_ChibiOS: fixed UART send from TX complete IRQ 2018-02-07 20:33:45 +11:00
Andrew Tridgell
63a825dd2c HAL_ChibiOS: don't call spiStart() unless bus is stopped 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e29b79f41b HAL_ChibiOS: fixed DMA allocation bug on SPI
thanks to Mark Whitehorn for finding this crash
2018-02-07 20:33:45 +11:00
Andrew Tridgell
29add8a880 HAL_ChibiOS: fixed build without FATFS enabled 2018-02-07 20:33:45 +11:00
Andrew Tridgell
6b187b393a HAL_ChibiOS: fixed fmuv4 build 2018-02-07 20:33:45 +11:00
Siddharth Purohit
e1a8bba58b HAL_ChibiOS: increase the stack size for uavcan thread 2018-02-07 20:33:45 +11:00
Siddharth Purohit
77f8acd7a1 HAL_ChibiOS: add CAN to supported peripherals list 2018-02-07 20:33:45 +11:00
Siddharth Purohit
6f21c1583f HAL_ChibiOS: add definitions to support uavcan in fmuv3 2018-02-07 20:33:45 +11:00
Siddharth Purohit
edd0e8d2f5 HAL_ChibiOS: add CANManager to ChibiOS namespace 2018-02-07 20:33:45 +11:00
Siddharth Purohit
143686f70d HAL_ChibiOS: add placeholder cstdio header 2018-02-07 20:33:45 +11:00
Siddharth Purohit
539d5adc13 hwdef: add more posix methods 2018-02-07 20:33:45 +11:00
Siddharth Purohit
288f6b1fa0 HAL_ChibiOS: add chibios cpp wrapers, libuavcan's stm32 driver uses it 2018-02-07 20:33:45 +11:00
Siddharth Purohit
f2e77ab773 AP_HAL_ChibiOS: add uavcan thread 2018-02-07 20:33:45 +11:00
Siddharth Purohit
3c009cf02c AP_HAL_ChibiOS: add CAN driver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
b992b5e02a HAL_ChibiOS: allow for 16kHz brushed on all timers 2018-02-07 20:33:45 +11:00
Andrew Tridgell
b0d0ee1f01 HAL_ChibiOS: reformat using yapf and support python3
allow hwdef.h compilation using python3
2018-02-07 20:33:45 +11:00
Andrew Tridgell
67e0ba22fe HAL_ChibiOS: fixed some errors in F405 tables 2018-02-07 20:33:45 +11:00
Andrew Tridgell
70ff3871e0 HAL_ChibiOS: fixed RC in on CH1 of timer 2018-02-07 20:33:45 +11:00
Andrew Tridgell
890d322b47 HAL_ChibiOS: starting on mini-pix hwdef.dat
for RadioLink mini-pix board
2018-02-07 20:33:45 +11:00
Andrew Tridgell
23555f4c25 HAL_ChibiOS: allow for empty storage during bringup
useful when storage backend driver isn't written yet
2018-02-07 20:33:45 +11:00
Andrew Tridgell
ecce2a73d0 HAL_ChibiOS: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell
713006bb1d HAL_ChibiOS: allow more OTG defines to be overridden 2018-02-07 20:33:45 +11:00
Andrew Tridgell
1fb257a35a HAL_ChibiOS: initial hwdef.dat for revo mini 2018-02-07 20:33:45 +11:00
Andrew Tridgell
979a2a4796 HAL_ChibiOS: removed debug code 2018-02-07 20:33:45 +11:00
Siddharth Purohit
538af2a58a HAL_ChibiOS: fix parity and stop bit setting 2018-02-07 20:33:45 +11:00
Mark Whitehorn
b94b1dcd97 AP_HAL_ChibiOS: add missing declaration 2018-02-07 20:33:45 +11:00
Siddharth Purohit
df4bf7e476 HAL_ChibiOS: fix irq clash with unnecessary access to readbuf ring buffer 2018-02-07 20:33:45 +11:00
Siddharth Purohit
02696882e9 HAL_ChibiOS: if unbuffered write, do continue to invoke DMA writes
adds higher latency to device sharing DMA
2018-02-07 20:33:45 +11:00
proficnc
c613c0bde2 added the cube red hardware definition 2018-02-07 20:33:45 +11:00
Andrew Tridgell
3dacbd1b36 HAL_ChibiOS: hold write lock for unbuffered writes 2018-02-07 20:33:45 +11:00
Andrew Tridgell
ad26ca4a27 HAL_ChibiOS: implement parity and stop bits controls 2018-02-07 20:33:45 +11:00
Andrew Tridgell
2e15285c51 HAL_ChibiOS: refuse unbuffered writes without DMA
we would need much more complex code to handle this
2018-02-07 20:33:45 +11:00
Andrew Tridgell
3f2cc2c9d6 HAL_ChibiOS: implement low latency UART writes
this implements the set_unbuffered_writes() API by performing writes
directly in the write() call and not from a timer
2018-02-07 20:33:45 +11:00
Andrew Tridgell
015c3a1fa3 HAL_ChibiOS: removed duplicate defines 2018-02-07 20:33:45 +11:00
Andrew Tridgell
865e4f3104 HAL_ChibiOS: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
a5bafb399f HAL_ChibiOS: adjust SPI pin speeds 2018-02-07 20:33:45 +11:00
Andrew Tridgell
7b251c9739 HAL_ChibiOS: lower FRAM CS speed to 2MHz
this matches old firmware
2018-01-20 17:40:07 +11:00
Andrew Tridgell
30fd2da108 HAL_ChibiOS: enable RTSCTS and SBUS_OUT 2018-01-20 17:40:07 +11:00
Andrew Tridgell
63671b06a8 HAL_ChibiOS: added HAL_I2C_MAX_CLOCK define 2018-01-20 17:40:07 +11:00
Andrew Tridgell
88f11f5a50 HAL_ChibiOS: added HAL_I2C_BUS_BASE
this allows fmuv4 to start at bus 1
2018-01-20 17:40:07 +11:00
bugobliterator
c60c0b8ab1 HAL_ChibiOS: fix undef line processing 2018-01-20 17:40:07 +11:00
Andrew Tridgell
8286486890 HAL_ChibiOS: drop default SPI priority to 179 2018-01-20 17:40:07 +11:00
Andrew Tridgell
ab748034a2 HAL_ChibiOS: removed RC inversion logic
not needed any more
2018-01-20 17:40:07 +11:00
bugobliterator
7db19cfae0 HAL_ChibiOS: use separate parameter for detect timeout 2018-01-20 17:40:07 +11:00
Andrew Tridgell
613d7a47ba HAL_ChibiOS: support RCIN on mindpx-v2 2018-01-20 17:40:07 +11:00
bugobliterator
02c7513f83 HAL_ChibiOS: add invert method and fix width measurement 2018-01-20 17:40:07 +11:00
bugobliterator
f7ac5aa079 HAL_ChibiOS: put rcin on a separate thread 2018-01-20 17:40:07 +11:00
Andrew Tridgell
f50f427a59 HAL_ChibiOS: added comment on beta fmuv4 board 2018-01-20 17:40:07 +11:00
Andrew Tridgell
743806116d HAL_ChibiOS: removed unusued ppm driver
now uses AP_RCProtocol
2018-01-20 17:40:07 +11:00
Andrew Tridgell
ccb85c2707 HAL_ChibiOS: fixed fmuv3 build with no ICU 2018-01-20 17:40:07 +11:00
Andrew Tridgell
33c7cba9af HAL_ChibiOS: use more efficient push mechanism in IRQ
and don't use push_force() as it is not safe to do reads from within
the producer
2018-01-20 17:40:07 +11:00
Andrew Tridgell
7a4f429b85 HAL_ChibiOS: don't adjust buffer size for protocol
its all about IRQ latency, not IRQ rate
2018-01-20 17:40:07 +11:00
Andrew Tridgell
e2c8fe27ef HAL_ChibiOS: fixed memory handling in SoftSigReader 2018-01-20 17:40:07 +11:00
bugobliterator
eeea2c9961 HAL_ChibiOS: use software signal reader for RCInput if available 2018-01-20 17:40:07 +11:00
bugobliterator
6be4c710c3 HAL_ChibiOS: add Software Signal reader using timer and DMA 2018-01-20 17:40:07 +11:00
bugobliterator
1db1ff799e HAL_ChibiOS: modify hwdef scripts to setup for generic RCIN 2018-01-20 17:40:07 +11:00
bugobliterator
1970d8a2c8 HAL_ChibiOS: use common RCIN pin for fmuv4 2018-01-20 17:40:07 +11:00
bugobliterator
445ba6ed39 HAL_ChibiOS: update ppm to use Extended ICU driver 2018-01-20 17:40:07 +11:00
Andrew Tridgell
7c23e33775 HAL_Chibios: set min output rate for oneshot to 100Hz
this will keep ESCs happy during gyro cal
2018-01-20 17:40:07 +11:00
Andrew Tridgell
b07c599bf2 Hal_Chibios: allow for faster INS sample times
we need higher priority on SPI and faster device loops
2018-01-20 17:40:07 +11:00
Andrew Tridgell
25f13ed518 HAL_Chibios: adjust MPU9250 clock speed down
this helps with fast sampling enabled
2018-01-20 17:40:07 +11:00
Andrew Tridgell
7e44b06440 HAL_ChibiOS: adjust SPI clock rates on FMUv4
this prevents some timing errors on the IMUs
2018-01-20 17:40:07 +11:00
Andrew Tridgell
dd59a5ff57 HAL_ChibiOS: adjust external bus clock for mpu9250
this fixes an issue with fast sampling on the PH2.1 cube
2018-01-20 17:40:07 +11:00
Andrew Tridgell
880a84294e HAL_ChibiOS: support oneshot mode
supports oneshot 125 and oneshot
2018-01-20 17:40:07 +11:00
Andrew Tridgell
ba3cdf74b5 HAL_Chibios: optional ADC debugging
this debugging capability is very useful on board bringup. It outputs
the first 6 analog channels as an AP_ADC MAVLink message
2018-01-20 17:40:07 +11:00
Andrew Tridgell
c863681849 HAL_ChibiOS: fixed PWM output assignment 2018-01-20 17:40:07 +11:00
Andrew Tridgell
82c6d2751f HAL_ChibiOS: fixed F412 ram and flash setup 2018-01-20 17:40:07 +11:00
Peter Barker
67bed1d6c2 HAL_ChibiOS: added support for Sparky2 STM23F405 board 2018-01-20 17:40:07 +11:00
Andrew Tridgell
f6138e3c91 HAL_ChibiOS: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
8dae3fe59b HAL_ChibiOS: use calloc for malloc type
this is not strictly necessary on ChibiOS as we already override
malloc, but will keep static analysis happy
2018-01-17 11:22:05 +11:00
Andrew Tridgell
7ca3b56886 HAL_ChibiOS: fixed STM32F405 typos 2018-01-16 09:46:30 +11:00
Andrew Tridgell
e120e912f1 HAL_ChibiOS: moved board defines to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
e2a65c8c60 HAL_ChibiOS: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
cde930f5c8 HAL_ChibiOS: added skyviper-v2450 hwdef config 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c8beddf1e4 HAL_ChibiOS: allow for includes in hwdef.dat files
this allows creation of derived boards
2018-01-15 11:46:02 +11:00
Andrew Tridgell
2929b3dbb1 HAL_ChibiOS: allow builds on systems with no SDIO 2018-01-15 11:46:02 +11:00
Andrew Tridgell
7b0eccc309 HAL_ChibiOS: updated skyviper-f412 hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
60a773d045 HAL_ChibiOS: removed duplicate defines 2018-01-15 11:46:02 +11:00
Andrew Tridgell
ef1a14cc6c HAL_ChibiOS: fixed 5V analog scale on fmuv4 and mindpx-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
867e7ebf71 HAL_ChibiOS: auto-generate GPIO table from hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
fbe8166c71 HAL_ChibiOS: auto-generate AnalogIn pin table 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f14a847b97 HAL_ChibiOS: rename classes to remove 'Chibi'
it is redundent as all classes are in ChibiOS namespace, and makes the
code harder to read
2018-01-15 11:46:02 +11:00
Andrew Tridgell
25b68dc150 HAL_ChibiOS: switch base freq when needed
timers can't do below 123 Hz with a clock of 8MHz, so we need to
change clock frequency based on the target period
2018-01-15 11:46:02 +11:00
Andrew Tridgell
738d70ef02 HAL_ChibOS: fixed handling of disabled channels 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2978649cd4 waf: moved to generated loader script 2018-01-15 11:46:02 +11:00
Andrew Tridgell
6e4ef32628 HAL_ChibiOS: moved to generated loader script 2018-01-15 11:46:02 +11:00
Andrew Tridgell
9482ab1840 waf: use common makefile for ChibiOS if no custom present 2018-01-15 11:46:02 +11:00
Andrew Tridgell
bae9469af7 HAL_ChibiOS: use a common makefile and board.c
allow for custom files per board if supplied, but don't require them
for every board
2018-01-15 11:46:02 +11:00
Andrew Tridgell
d17e9f321a HAL_ChibOS: fixed mixture of brushed and normal PWM
allow non-brushed PWM servos with brushed main motors
2018-01-15 11:46:02 +11:00
Andrew Tridgell
c639708e22 HAL_ChibOS: auto-generate full PWM config
use PWM markers in hwdef.dat to mark each PWM channel
2018-01-15 11:46:02 +11:00
Andrew Tridgell
daa9eec836 HAL_ChibiOS: auto-configure timer channels
allow for one marked PPMIN for input
2018-01-15 11:46:02 +11:00
Andrew Tridgell
d65ec2ada7 HAL_ChibiOS: moved more headers to common
allow customisation, but don't require every port to copy the defaults
2018-01-15 11:46:02 +11:00
Andrew Tridgell
960bc40ff3 HAL_ChibiOS: moved to a common mcuconf.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell
48d2704cf4 HAL_ChibiOS: CS pins don't need to be a single SPI BUS
its possible to use a CS pin on different buses, so they should not
have a particular bus tag
2018-01-15 11:46:02 +11:00
Andrew Tridgell
a554215576 HAL_ChibiOS: start to cope with not having I2C, SPI and UARTs 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f5c8754d75 HAL_ChibiOS: use ARRAY_SIZE_SIMPLE
this allows for boards without a device type (eg. no SPI bus)
2018-01-15 11:46:02 +11:00
Andrew Tridgell
468cadca45 HAL_ChibiOS: auto-generate UART driver declarations 2018-01-15 11:46:02 +11:00
Andrew Tridgell
58796ff435 HAL_Chibios: moved SPI device tables to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d1f93cd66c HAL_Chibios: auto-generate I2C, SPI and UART device lists
this is less error prone and make a port faster as more information is
in hwdef.dat
2018-01-15 11:46:02 +11:00
Andrew Tridgell
280140bf25 HAL_ChibiOS: added support for MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
9f5e01d20a HAL_Chibios: fixed FMUv4 compasses 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2646b9ef33 HAL_Chibios: matched debug port speed to NuttX 2018-01-15 11:46:02 +11:00
Andrew Tridgell
41be81af34 HAL_Chibios: added hardware flow control for UARTs
implement RTS in software and CTS in hardware
2018-01-15 11:46:02 +11:00
Andrew Tridgell
9916a93919 HAL_ChibiOS: fixed I2C device list 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f135e73e04 HAL_ChibiOS: F412 doesn't have CCM ram 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c3435e45c5 HAL_ChibiOS: initial port to FMUv4 2018-01-15 11:46:02 +11:00
bugobliterator
5feef04f5f HAL_ChibiOS: add support for CCM memory
this uses DMA bounce buffers for bus transfers, and falls back to CCM
ram in allocations if the type is unspecified
2018-01-15 11:46:02 +11:00
Andrew Tridgell
36227aa126 HAL_ChibiOS: implement bus speed and smbus for I2C
use the slowest speed of all devices on the bus
2018-01-15 11:46:02 +11:00
Andrew Tridgell
4b5e617673 HAL_ChibiOS: added missing DMA table for STM32F405 2018-01-15 11:46:02 +11:00
Peter Barker
f3d46506b0 AP_HAL_Chibios: warning fixes 2018-01-15 11:46:02 +11:00
Andrew Tridgell
791edee0ff HAL_Chibios: added more SPI devices for FMUv3 2018-01-15 11:46:02 +11:00
Andrew Tridgell
755eca31c2 HAL_Chibios: don't unregister shared DMA
the shared DMA handle is a property of the bus, not the device, so
should not be unregistered when the device is removed
2018-01-15 11:46:02 +11:00
Andrew Tridgell
9812fc9574 HAL_Chibios: prevent creation of i2c devices on invalid bus 2018-01-15 11:46:02 +11:00
Andrew Tridgell
b62773bbad HAL_ChibiOS: improved auto-config of ADC pins
ADC config now based on pin_scaling array
2018-01-15 11:46:02 +11:00
Andrew Tridgell
1cc4b92b76 HAL_ChibiOS: added additional FMUv3 analog pins 2018-01-15 11:46:02 +11:00
Andrew Tridgell
aa2175ec0c HAL_ChibiOS: show ADC1 channels in hwdef.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell
5a7e2f75d1 HAL_ChibiOS: added ADC1_Map to STM32 tables 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3a004adbd4 HAL_Chibios: use macro for NUM_GROUPS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
b57f8f01c6 HAL_Chibios: fixed return for read on invalid gpio pin 2018-01-15 11:46:02 +11:00
Andrew Tridgell
7971f03bde Hal_Chibios: fixed F412 SPI config 2018-01-15 11:46:02 +11:00
Andrew Tridgell
21f40da510 HAL_Chibios: align GPIO pins with px4 build 2018-01-15 11:46:02 +11:00
Andrew Tridgell
26d6947bf6 HAL_ChibiOS: fixed PWM output 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c742543565 HAL_Chibios: align SPI device IDs with px4 IDs
this makes for easier update to ChibiOS without redoing accelcal
2018-01-15 11:46:02 +11:00
Andrew Tridgell
6dbab450a5 Hal_Chibios: use AP_BoardConfig::io_enabled() 2018-01-15 11:46:02 +11:00
Andrew Tridgell
86fbdcd060 HAL_ChibiOS: ensure malloc returns zeroed memory 2018-01-15 11:46:02 +11:00
Andrew Tridgell
8b6bab7b17 HAL_Chibios: added ChibiOS HAL
this is based on initial work by Sid, reset here for easier merging
2018-01-15 11:46:02 +11:00