Ending a timeslot in time

The application is responsible for keeping track of timing within the Radio Timeslot and for ensuring that the application’s use of the peripherals does not last for longer than the granted timeslot length.

For these purposes, the application is granted access to the TIMER0 peripheral for the length of the timeslot. This timer is started from zero by the SoftDevice at the start of the timeslot, and is configured to run at 1 MHz. The recommended practice is to set up a timer interrupt that expires before the timeslot expires, with enough time left of the timeslot to do any clean-up actions before the timeslot ends. Such a timer interrupt can also be used to request an extension of the timeslot, but there must still be enough time to clean up if the extension is not granted.
Important: The scheduler uses the low frequency clock source for time calculations when scheduling events. If the application uses a TIMER (sourced from the current high frequency clock source) to calculate and signal the end of a timeslot, it must account for the possible clock drift between the high frequency clock source and the low frequency clock source.

Documentation feedback | Developer Zone | Subscribe | Updated 2016-12-09