Commit Graph

78 Commits

Author SHA1 Message Date
Andrew Tridgell 408f8b3940 HAL_ChibiOS: added check for overwrite of nullptr on H7
the STM32H7 has 64k of ITCM memory at address zero. We allow
allocation of everything except the first 1024 bytes. This checks for
those reserved bytes being overwritte, which would indicate a write to
nullptr
2020-11-18 17:14:43 +11:00
Andrew Tridgell 8f682c0782 HAL_ChibiOS: check all memory at 10Hz 2020-11-18 17:14:43 +11:00
Andrew Tridgell ee50eaf3c9 HAL_ChibiOS: go via AP_Filesystem for mount/unmount operations
this fixes a deadlock where a mount/unmount could access FATFS without
holding the AP_Filesystem semaphore
2020-10-27 10:45:03 +11:00
Andrew Tridgell e471b23f58 HAL_ChibiOS: add a max quota of GPIO interrupts
This implements a max quota of GPIO interrupts per 100ms period to
prevent high interrupt counts from consuming all CPU and causing a
lockup. The limit is set as 10k interrupts per 0.1s period. That limit
should be high enough for all reasonable uses of GPIO interrupt
handlers while being below the level that causes significant CPU loads
and flight issues

This addresses issue #15384
2020-10-02 09:38:24 +10:00
Siddharth Purohit cdf8e369f1 AP_HAL_ChibiOS: create UAVCAN agnostic CANIface driver
HAL_ChibiOS
2020-08-19 17:31:09 +10:00
Andrew Tridgell 2200dfefdb HAL_ChibiOS: during setup() we expect delays
this may fix occasional internal errors on SPI during startup
2020-05-10 15:12:43 +10:00
Peter Barker 48da4e523c AP_HAL_ChibiOS: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Andrew Tridgell 0ef66659ce HAL_ChibiOS: log WDOG message once a second
this copes with delayed mounting of the microSD, making it much more
likely we log the critical data
2020-04-29 07:36:55 +10:00
Andrew Tridgell 09477b2dfe HAL_ChibiOS: shorted thread names
changes names so threads can be distinguished by first 4 bytes
2020-04-29 07:36:55 +10:00
Andrew Tridgell 8dabd6cefc HAL_ChibiOS: expect a long delay on flash page erase
this prevents the display of errors on flash page erase
2020-04-14 10:02:51 +10:00
Andrew Tridgell 65cd223023 HAL_ChibiOS: implement in_expected_delay() 2020-03-11 16:30:06 +11:00
Stephen Dade e1e7c6ea8a AP_HAL: Ensure scheduler does not log if there is no logger 2019-11-20 11:46:34 +11:00
Andrew Tridgell 6b841e781c HAL_ChibiOS: pat watchdog immediately in expect_delay_ms()
this fixes a watchdog issue on AP_Periph if we don't have a timer
thread
2019-10-21 19:12:01 +11:00
Mirko Denecke b84dcd483d AP_HAL_ChibiOS: remove unnecessary tabs and whitespaces 2019-10-21 08:01:56 +11:00
Andrew Tridgell 06b272705e HAL_ChibiOS: run RCIN thread at 1kHz
this gives fast enough response for SBUS parsing on a UART
2019-09-06 08:51:45 +10:00
Andrew Tridgell 16bdaaa1af HAL_ChibiOS: added support for STM31F10x for AP_Periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell 5e40921b42 HAL_ChibiOS: fixed reboot hold in bootloader
thanks to Tom for noticing this
2019-08-12 22:21:13 -07:00
Andrew Tridgell 898150e460 HAL_ChibiOS: cope with calling delay_microseconds_boost() multiple times
needed for updated IMU wait code
2019-07-07 19:03:01 +10:00
Andrew Tridgell 59678840a8 HAL_ChibiOS: log SPI and I2C counters 2019-05-17 08:56:06 +10:00
Andrew Tridgell 0708b65c2d AP_HAL_ChibiOS: added const for PersistentData 2019-05-15 15:33:48 +10:00
Andrew Tridgell a7eb85e1c5 HAL_ChibiOS: cope with nesting of expected_delay_ms() 2019-05-15 15:33:48 +10:00
Andrew Tridgell 8d0bca6ba9 HAL_ChibiOS: log mavlink IDs and semaphore lines for watchdog
this gives a better chance of tracking down a hang
2019-05-15 15:33:48 +10:00
Andrew Tridgell d7a0eb42ee HAL_ChibiOS: added logging of watchdog data
log MON msgs in the leadup to a watchdog, and log a WDOG message after
a watchdog reset
2019-05-15 15:33:48 +10:00
Andrew Tridgell ce9e9d8670 HAL_ChibiOS: end scheduler boost on expected delay
we want timer thread to be higher priority than main thread while in a
long operation
2019-05-11 05:56:34 +10:00
Andrew Tridgell 19526b5826 HAL_ChibiOS: implement scheduler->expect_delay_ms() 2019-04-22 16:53:35 +10:00
Tom Pittenger 91b0650765 AP_HAL_ChibiOS: rename dataflash to logger 2019-03-28 16:40:58 +11:00
Andrew Tridgell 64681cb05c HAL_ChibiOS: allocate threads from any heap
this fixes a failure on MatekF405-Wing where it fails to allocate the
SPI thread for the IMU
2019-02-27 11:54:28 +11:00
Andrew Tridgell 57c573552c HAL_ChibiOS: check for logger instance before use 2019-02-26 16:18:26 +11:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Andrew Tridgell ed3194d095 HAL_ChibiOS: fixed timer reset 2018-12-31 08:00:14 +11:00
Andrew Tridgell 960d4c0a80 HAL_ChibiOS: allow mount of microSD after boot
when disarmed, try to mount sd card every 3s
2018-12-31 08:00:14 +11:00
Andrew Tridgell 6c761fa864 HAL_ChibiOS: shutdown IOMCU on reboot 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 15141a6a5a HAL_ChibiOS: allow for no RCIN or TIMER thread
saves memory on iomcu
2018-10-17 15:11:28 +11:00
Michael du Breuil 11ab6c59e1 AP_HAL_ChibiOS: Handle scripting priority 2018-10-09 10:08:52 +11:00
Siddharth Purohit b9319cae56 HAL_ChibiOS: disable segments relating to unused features 2018-09-19 12:14:15 +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
Francisco Ferreira 7278af05e0
AP_HAL_ChibiOS: remove CAN thread management 2018-08-12 13:35:01 +01:00
Siddharth Purohit 395c48933c HAL_ChibiOS: move tto using updated time conversion API 2018-08-03 13:44:59 +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 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 2b7b499c63 HAL_ChibiOS: added support for RTC sig for fast boot 2018-06-28 11:35:13 +10:00
Andrew Tridgell a0b4553a26 HAL_ChibiOS: fixed bootloader build issue 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
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
Eugene Shamaev 2055f264e5 AP_HAL_ChibiOS: helper func 2018-06-09 22:46:48 -07: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 4a9fe1745f AP_ChibiOS: Remove timer process suspension interface 2018-06-06 07:16:58 +10:00