-
Notifications
You must be signed in to change notification settings - Fork 17.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HAL_ChibiOS: replace volatile bools with mutexes
this replaces the two booleans used to mediate TX and RX buffer protection with mutexes. The booleans were a hangover from the very early HAL_ChibiOS code, and can lead to a deadlock. The sequence is as follows: - a very high CAN bus bandwidth usage, triggered by MissionPlanner requesting CAN_FORWARD on a CAN serial port. That causes a "infinite" number of CAN_FRAME messages which saturates the bus, and leads to the DroneCAN thread looping with no pause - a serial port configured as GPS type AUTO, auto-probing for a GPS that isn't there. This calls begin() periodically - the UART TX thread assocated with that UART not making progress as the TX thread priority is below the DroneCAN thread priority - this causes the begin() in main thread waiting for _in_tx_timer to loop forever, which triggers a watchdog
- Loading branch information
Showing
2 changed files
with
12 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters