Interrupt priority levels

S115 SoftDevice

This section gives an overview of interrupt levels used by the SoftDevice and the interrupt levels that are available for the application.

To implement the SoftDevice Application Programming Interface (API) as Supervisor Call (SVC)s (see Application programming interface) and ensure that embedded protocol real-time requirements are met independently of the application processing, the SoftDevice implements an interrupt model where application interrupts and SoftDevice interrupts are interwoven. This model results in application interrupts being postponed or preempted, leading to longer perceived application interrupt latency and interrupt execution times.

The application must take care to select the correct interrupt priorities for application events according to the guidelines that follow.

The nRF54L SoC has eight configurable interrupt priorities ranging from 0 to 7 with 0 being highest priority. On reset, all interrupts are configured with the highest priority (0).

When the SoftDevice is enabled, it reserves and uses the following priority levels, which must remain unused by the application programmer:

  • Level 0 is used for the SoftDevice's timing-critical processing.
  • Level 1 is reserved for future use on the S115 SoftDevice.
  • Level 4 is used by higher-level deferrable tasks and the API functions executed as SVC interrupts.

The application can use the remaining interrupt priority levels, in addition to the main, or thread, context.

Figure 1. Exception model
Exception model
Note: Priority level 1 is reserved for future use on the S115 SoftDevice.
Note: The priorities of the interrupts reserved by the SoftDevice cannot be changed. This includes the SVC interrupt. Handlers running at a priority level higher than 4 (lower numerical priority value) have neither access to SoftDevice functions nor to application-specific SVCs or RTOS functions running at lower priority levels (higher numerical priority values).

The following figure shows an example of how interrupts with different priorities might run and preempt each other. Some priority levels are left out for clarity.

Figure 2. SoftDevice exception examples
SoftDevice exception examples