Hello,
I am working on a project based on the nRF51822 with the softdevice S110.
I am trying to develop an application using the main loop provided in an example application:
// Enter main loop
for (;;)
{
app_sched_execute();
<<-- interrupt raised here that calls app_sched_event_put
sd_app_evt_wait();
}
I am puzzled by this code for the idle loop, I do not understand how the system handles a situation where an interrupt is raised between the execution of app_shed_execute and sd_app_evt_wait. If the interrupt invokes a app_sched_event_put, then the system will still go to (deep) sleep mode and will not execute the event handler until the next loop which could come much later. Am I missing something in the architecture?
Thanks Louis