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

SDK app scheduler

Hello all,

I'm looking at the example projects and ble_app_template in particular, and have noticed something that doesn't seem to make sense...

In main(), this project sets up the scheduler module, and then loops calling app_sched_execute(), so it appears to be a project actioning BLE events at "main task" level (as opposed to SW-interrupt level).

However, looking at the call to ble_stack_init(), NULL is passed to SOFTDEVICE_HANDLER_INIT, and then there are calls to both softdevice_ble_evt_handler_set() and softdevice_sys_evt_handler_set(). As far as I can see (from API documentation and code itself), this means that the scheduler won't be used, and BLE/system events will be actioned at SW-interrupt level?

Can anyone please clarify what's going on here?

Regards, Richard.

Related