This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Observer under FreeRTOS: Events stop coming after a few minutes.

Observer under FreeRTOS: Events stop coming after a few minutes.

Hi there,

I am using the nRF52832 as simple observer running under FreeRTOS on a custom board. The built is based on the SDK HRM peripheral example. I have stripped down my code so that only the task left is the one in which the SD runs. I have a handler for BLE_GAP_EVT_ADV_REPORT events installed. Nothing else is running (no UART or any other peripheral).

The SD stops calling my handler after a few minutes (completely random) if the runtime of the handler (artificial busy-loop) is longer than about 300us which, I guess, is roughly the minimum distance between two advertising reports minus caller overhead. The SD throws no hardfault or any other error, the BLE events just stop coming in. FreeRTOS continues running normally. With the handler runtime below 200us, everything is fine. Strangely, runtimes >>300us (e.g. 10ms) do not accelerate the occurrence of the error.

Any idea where this might come from?

Thanks.

Related