Commit Graph

275 Commits

Author SHA1 Message Date
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