AHB multilayer enables parallel access paths between multiple masters and slaves in a system. Access is resolved using priorities.
Each bus master is connected to a slave device through one or more interconnection matrixes. The bus masters are assigned priorities that are used to resolve access when two (or more) bus masters request access to the same slave device. The following applies when assigning priorities:
- If two (or more) bus masters request access to the same slave device, the master with the highest priority is granted access first.
- Bus masters with lower priority are stalled until the higher priority master has completed its transaction.
- If the higher priority master pauses at any point during its transaction, the lower priority master in queue is temporarily granted access to the slave device until the higher priority master resumes its activity.
- Bus masters that have the same priority are mutually exclusive, and cannot be used concurrently.
Some peripherals, like RADIO, do not have a safe stalling mechanism (not able to pause incoming data and no internal data buffering). Being a low priority bus master might cause loss of data for such peripherals upon bus contention. To avoid AHB bus contention when using multiple bus masters, apply one of the following guidelines:
- Avoid situations where more than one bus master is accessing the same slave.
- If more than one bus master is accessing the same slave, make sure that the bus bandwidth is not exhausted.
AHB multilayer priorities
Each master connected to the AHB multilayer is assigned a default natural priority.
| Bus master name | Natural relative priority | In/Out | Description |
|---|---|---|---|
| CPU | Highest priority | I/O | |
| RADIO | I/O | ||
| CCM/ECB/AAR | I/O | Same priority and mutually exclusive | |
| UARTE0/SPIM0/SPIS0/TWIM0/TWIS0 | Lowest priority | I/O | Same priority and mutually exclusive |