Skip to content

fix(ble): Use a reserved interrupt to dispatch FreeRTOS functions

schneider requested to merge schneider/ble-stability into master

The BLE stack sometimes calls a few functions which we have to implement from an interrupt context. We have to execute FreeRTOS functions from these callbacks. This limits the priority of the interrupts from which the callbacks originate (see https://freertos.org/RTOS-Cortex-M3-M4.html).

This created issues with the BLE stack as the interrupts did not have a high enough priority (especially when logging is active).

This patch uses a software triggered interrupt to dispatch the callback into a lower priority and keep the BLE ISRs running at a higher priority.

There should be no negative effects, but testing BLE has proven to be notoriously difficult.

Merge request reports