AAR — Accelerated address resolver

Accelerated address resolver is a cryptographic support function for implementing the "Resolvable Private Address Resolution Procedure" described in the Bluetooth Core specification v4.0. "Resolvable private address generation" should be achieved using ECB and is not supported by AAR.

The procedure allows two devices that share a secret key to generate and resolve a hash based on their device address. The AAR block enables real-time address resolution on incoming packets when configured as described in this chapter. This allows real-time packet filtering (whitelisting) using a list of known shared keys (Identity Resolving Keys (IRK) in Bluetooth).

Shared resources

The AAR shares registers and other resources with the peripherals that have the same ID as the AAR. The user must therefore disable all peripherals that have the same ID as the AAR before the AAR can be configured and used.

Disabling a peripheral that have the same ID as the AAR will not reset any of the registers that are shared with the AAR. It is therefore important to configure all relevant AAR registers explicitly to secure that it operates correctly.

See the Instantiation table in Instantiation for details on peripherals and their IDs.

EasyDMA

The AAR implements EasyDMA for reading and writing to the RAM. The EasyDMA will have finished accessing the RAM when the END, RESOLVED, and NOTRESOLVED events are generated.

If the IRKPTR, ADDRPTR and the SCRATCHPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory for more information about the different memory regions.

Resolving a resolvable address

As per Bluetooth specification, a private resolvable address is composed of six bytes.

Figure 1. Resolvable address

To resolve an address the ADDRPTR register must point to the start of packet. The resolver is started by triggering the START task. A RESOLVED event is generated when the AAR manages to resolve the address using one of the Identity Resolving Keys (IRK) found in the IRK data structure. The AAR will use the IRK specified in the register IRK0 to IRK15 starting from IRK0. How many to be used is specified by the NIRK register. The AAR module will generate a NOTRESOLVED event if it is not able to resolve the address using the specified list of IRKs.

The AAR will go through the list of available IRKs in the IRK data structure and for each IRK try to resolve the address according to the Resolvable Private Address Resolution Procedure described in the Bluetooth Specification1. The time it takes to resolve an address may vary depending on where in the list the resolvable address is located. The resolution time will also be affected by RAM accesses performed by other peripherals and the CPU. See the Electrical specifications for more information about resolution time.

The AAR will only do a comparison of the received address to those programmed in the module. And not check what type of address it actually is.

The AAR will stop as soon as it has managed to resolve the address, or after trying to resolve the address using NIRK number of IRKs from the IRK data structure. The AAR will generate an END event after it has stopped.

Figure 2. Address resolution with packet preloaded into RAM

Use case example for chaining RADIO packet reception with address resolution using AAR

The AAR may be started as soon as the 6 bytes required by the AAR have been received by the RADIO and stored in RAM. The ADDRPTR pointer must point to the start of packet.

Figure 3. Address resolution with packet loaded into RAM by the RADIO

IRK data structure

The IRK data structure is located in RAM at the memory location specified by the CNFPTR pointer register.

Table 1. IRK data structure overview
PropertyAddress offsetDescription
IRK00IRK number 0 (16 - byte)
IRK116IRK number 1 (16 - byte)
......
IRK15240IRK number 15 (16 - byte)

Registers

Table 2. Instances
Base addressPeripheralInstanceDescriptionConfiguration
0x4000F000AARAARAcelerated Address Resolver  
Table 3. Register Overview
RegisterOffsetDescription
TASKS_START0x000Start resolving addresses based on IRKs specified in the IRK data structure 
TASKS_STOP0x008Stop resolving addresses 
EVENTS_END0x100Address resolution procedure complete 
EVENTS_RESOLVED0x104Address resolved 
EVENTS_NOTRESOLVED0x108Address not resolved 
INTENSET0x304Enable interrupt 
INTENCLR0x308Disable interrupt 
STATUS0x400Resolution status 
ENABLE0x500Enable AAR 
NIRK0x504Number of IRKs 
IRKPTR0x508Pointer to IRK data structure 
ADDRPTR0x510Pointer to the resolvable address 
SCRATCHPTR0x514Pointer to data area used for temporary storage 

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id                             CBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWEND  

Write '1' to Enable interrupt for END event

See EVENTS_END

   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
BRWRESOLVED  

Write '1' to Enable interrupt for RESOLVED event

See EVENTS_RESOLVED

   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
CRWNOTRESOLVED  

Write '1' to Enable interrupt for NOTRESOLVED event

See EVENTS_NOTRESOLVED

   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
 

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id                             CBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWEND  

Write '1' to Disable interrupt for END event

See EVENTS_END

   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
BRWRESOLVED  

Write '1' to Disable interrupt for RESOLVED event

See EVENTS_RESOLVED

   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
CRWNOTRESOLVED  

Write '1' to Disable interrupt for NOTRESOLVED event

See EVENTS_NOTRESOLVED

   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
 

STATUS

Address offset: 0x400

Resolution status

Bit number313029282726252423222120191817161514131211109876543210
Id                            AAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARSTATUS [0..15]The IRK that was used last time an address was resolved
 

ENABLE

Address offset: 0x500

Enable AAR

Bit number313029282726252423222120191817161514131211109876543210
Id                              AA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWENABLE  Enable or disable AAR
   Disabled0Disable
   Enabled3Enable
 

NIRK

Address offset: 0x504

Number of IRKs

Bit number313029282726252423222120191817161514131211109876543210
Id                           AAAAA
Reset 0x0000000100000000000000000000000000000001
IdRWFieldValue IdValueDescription
ARWNIRK [1..16]Number of Identity root keys available in the IRK data structure
 

IRKPTR

Address offset: 0x508

Pointer to IRK data structure

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWIRKPTR  Pointer to the IRK data structure
 

ADDRPTR

Address offset: 0x510

Pointer to the resolvable address

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWADDRPTR  Pointer to the resolvable address (6-bytes)
 

SCRATCHPTR

Address offset: 0x514

Pointer to data area used for temporary storage

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSCRATCHPTR  Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved.
 

Electrical specification

AAR Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
tAAR,8Time for address resolution of 8 IRKs48µs
1 Bluetooth Specification Version 4.0 [Vol 3] chapter 10.8.2.3.