The nRF5 SDK is event-driven. So does it mean that the event handler in my application will be directly called in the interrupt service routine? If I write a long event handler, does it will affect other things?
The nRF5 SDK is event-driven. So does it mean that the event handler in my application will be directly called in the interrupt service routine? If I write a long event handler, does it will affect other things?
Hi,
Yes and no.
The event handler in your application is called as part of a software interrupt, although with relatively low priority. See the Interrupt priority levels section of the SoftDevice specification. It will only affect other things that are of same or lower interrupt priority. (Higher number is lower priority.)
You may also run events (and any other interrupt triggered things) in main context (lowest priority), by using the Schedule handling library.
Regards,
Terje