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

unexpected sd_app_evt_wait() returning

Hello,

I have a BLE application, running a GATT server on a nrf52832. The main loop, is basically an endless loop, starting with a call to `sd_app_evt_wait()`, then handling events provided by `sd_ble_evt_get()`. I toggle a debug pin at the beginning and the end of the main loops body.

When I connect with a BLE client to the GATT server, the debug pin starts to toggle very quickly, with a period of ~12.5µs. I use a counter to ignore the first 1000 runs through the main loop, after which I insert a break point. No call to `sd_ble_evt_get()` returns any event. Before hitting the breakpoint, I store NVIC->ISPR[0] in a variable. The value of this variable is 1, which indicates, that `sd_app_evt_wait()` returned doe to a pending radio interrupt.
How can I avoid, to have `sd_app_evt_wait()` returning, even when there is no event to handle? How can I further investigate what happens here? (Softdevice in use is S132 Version 6.1.0).
Thanks in advance,
Torsten
Parents Reply Children
No Data
Related