Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

using app scheduler does not prevent BLE stack starvation

Hello,

In our application we heavily use the application scheduler. This was done for 2 main reasons:

  1. serialize access to system resources
  2. enable the soft device to handle higher priority tasks

It appears that it isn't sufficient to use the application schedule to accomplish the second objective. You also need to inject timer delays between the scheduled events, otherwise BLE communication will be starved. 

Is this how the application scheduler should work? I was under the impression that application scheduled events where the last thing to be serviced. 

We are using SDK14 with the nRF52832 processor.

Thanks

Parents Reply
  • Is it possible to get a on air sniffer log do you think? Or possible just dump the BLE evt_id to UART, so we may try to find which event that in specific may be the problem here. 

    The 0x16 error is local host terminated, do you initialize or receive connection update/phy update/ channel map update on the device?

     

    Also does this happen on a peripheral or a central? 

    A quick calculation on your description means you may be blocking BLE events for 64kB/128B*20ms=10seconds. This is a long time, but should work, so I would like to understand which event in specific that may be time critical.

Children
Related