Bluetooth® low energy scanner and initiator processor usage patterns

This section describes the processor availability and interrupt processing time for the SoftDevice when the scanner or initiator role is running.

Figure 1. Scanning or initiating (some priority levels left out for clarity)

When scanning or initiating, the pattern of SoftDevice processing activity at interrupt priority level 0 is as follows:

  1. An interrupt (Radio prepare) sets up and prepares the software and hardware for this scanner or initiator event.
  2. A short interrupt occurs when the Radio starts listening for advertisement packets.
  3. During scanning, there will be zero or more instances of radio processing, depending upon whether the active role is a Scanner or an Initiator, whether scanning is passive or active, whether advertising packets are received or not and upon the type of the received advertising packets. Such radio processing may be followed by the SoftDevice processing at interrupt priority level 4.
  4. When the event ends (either by timeout, or if the Initiator receives a connectable advertisement packet it accepts), the SoftDevice does some Post processing, which may be followed by processing at interrupt priority level 4.

SoftDevice processing activity in the different priority levels when scanning or initiating is outlined in Table 1. The typical case is seen when scanning or initiating without using a whitelist and without sending scan or connect requests. The max case can be seen when scanning or initiating with a full whitelist, sending scan or connect requests while having a maximum number of connections and utilizing the Radio Timeslot API and Flash memory API at the same time.

Table 1. Processor usage for scanning or initiating
Parameter Description Min Typical Max
tISR(0),RadioPrepare Processing when preparing the radio for scanning or initiating   25 μs 42 μs
tISR(0),RadioStart Processing when starting the scan or initiation   20 μs 25 μs
tISR(0),RadioProcessing Processing after sending/receiving packet   38 μs 60 μs
tISR(0),PostProcessing Processing at the end of a scanner or initiator event   79 μs 170 μs
tnISR(0) Distance between interrupts during scanning 30 μs >1.5 ms  
tISR(4) Priority level 4 interrupt at the end of a scanner or initiator event   27 μs  

From the table we can calculate a typical processing time for one scan event receiving one advertisement packet to be

tISR(0),RadioPrepare + tISR(0),RadioStart + tISR(0),RadioProcessing + tISR(0),PostProcessing + tISR(4) = 189 μs

which means that typically more than 99% of the processor time is available to the application when scanning with a 100 ms interval under these conditions.