Commit Graph

69 Commits

Author SHA1 Message Date
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
Francisco Ferreira e4382c2232 AP_HAL_ChibiOS: fix CAN thread name 2018-02-28 11:37:55 +09: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 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 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 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 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 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 f2e77ab773 AP_HAL_ChibiOS: add uavcan thread 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 865e4f3104 HAL_ChibiOS: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
bugobliterator f7ac5aa079 HAL_ChibiOS: put rcin on a separate thread 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 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 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