6 years, 11 months ago.

nRF52832 Assert Lockup

Hello, I'm developing an application for the nRF52832 using mbed along with Nordic's S132 softdevice.

My application is running a few different threads:

- Main which handles sensor polling and small display

- ADC ISR sampling at 22kHz

- DSP Processing Thread

- BLE management thread

My application appears to run fine for around 30 seconds to 2 minutes when connected over BLE. Sensor data is sent around every 1 second. After some time, this 1 second slows down (not intended) and eventually I encounter an error:

mbed error

 mbed assertation failed: os_timer->get_tick() == svcRtxKernelGetTickCount(), file: mbed-os/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp

After this occurs, my mbed application enters mbed_die() however the underlying softdevice functions normally - at least for a while.

Can anyone give me any insight as to why this assertion may be failing? It appears to be caused by something spending too much time in an ISR or something, causing the systems clocks to get out of sync.

Any hints would be appreciated, thank you.

EDIT: I have sequentially removed threads from my application until the assert error disappeared. It seems the DSP code (running an FFT) is somehow causing the issue.

1 Answer

6 years, 9 months ago.

If you disable interrupts for too long this can occur. I created a fix for it here: https://github.com/ARMmbed/mbed-os/pull/5942