Every signal on the AMBA APB interface — source, width, version introduced, and exactly what each signal does and when it must be valid. From PCLK and PRESETn through to the APB5 user and parity signals.
APB signals have a consistent naming convention. Understanding the convention tells you what a signal does before you even look it up.
PRESETn is active when LOW)Some signals have a fixed width (PWRITE is always 1 bit). Others are parameterised by properties. When a property value is zero, the corresponding signal is not present on the interface. This is how APB handles optional signals — they simply don’t exist on interfaces that don’t need them.
Source: system clock controller | Width: 1 bit | APB2+
PCLK is the clock for the entire APB domain. Every APB signal — from both the Requester and Completer — is sampled on the rising edge of PCLK. There are no asynchronous APB signals. All setup and hold timing requirements are defined relative to PCLK rising edge.
The APB clock domain may run slower than the main system bus (AXI/AHB). The APB bridge handles the clock domain crossing internally — from the software perspective, APB transfers always complete synchronously to PCLK.
Source: system bus reset | Width: 1 bit | APB2+
PRESETn is the active-LOW reset signal. It is normally connected directly to the system bus reset. When PRESETn is asserted (LOW), the APB interface is held in its reset state:
These signals exist in every APB implementation from the original APB2 (2003) onwards. Every APB peripheral must have all of these signals.
Source: Requester | Width: ADDR_WIDTH (up to 32 bits) | APB2+
The APB address bus. Must be valid when PSELx is asserted and must remain stable throughout both the Setup and Access phases (including all wait state cycles). PADDR indicates a byte address. An unaligned address is permitted but the result is UNPREDICTABLE — a Completer may use the unaligned address, align it, or signal an error.
APB has a single address bus shared between reads and writes. Unlike AXI, there is no separate read address channel and write address channel.
Source: Requester | Width: 1 bit per Completer | APB2+
There is one PSELx signal per Completer. The Requester (APB bridge) asserts the appropriate PSELx to select the target peripheral for the current transfer. Only one PSELx is asserted at a time — the bridge decodes PADDR to determine which peripheral owns the addressed register and asserts only that peripheral’s PSELx.
PSELx being asserted marks the start of the Setup phase. It must remain asserted throughout the entire transfer (Setup + Access + all wait states).
Source: Requester | Width: 1 bit | APB2+
PENABLE distinguishes the Setup phase from the Access phase. It is deasserted during Setup (first cycle) and asserted during Access (second and subsequent cycles). The combination PSELx=1, PENABLE=0 means Setup phase. PSELx=1, PENABLE=1 means Access phase.
PENABLE is deasserted at the end of every transfer, even in back-to-back transfers between the same peripheral.
Source: Requester | Width: 1 bit | APB2+
Indicates the direction of the transfer. HIGH = write (Requester writes to Completer). LOW = read (Completer drives PRDATA to Requester). Must remain stable throughout the transfer.
Source: Requester | Width: DATA_WIDTH (8, 16, or 32 bits) | APB2+
The write data bus, driven by the Requester when PWRITE is HIGH. Must be valid throughout both phases and all wait states. Not required to be valid during read transfers (when PWRITE=0), but the spec recommends driving it to zero when unused.
Source: Completer | Width: DATA_WIDTH (same as PWDATA) | APB2+
The read data bus, driven by the selected Completer when PWRITE is LOW. Must be valid by the end of the Access phase (i.e., before the cycle in which PREADY goes HIGH and the transfer completes). The Completer must ensure PRDATA is stable when PSEL, PENABLE, and PREADY are all HIGH.
APB3 added two signals that make peripherals much more practical to implement: PREADY allows variable-latency responses, and PSLVERR allows error reporting.
Source: Completer | Width: 1 bit | Default (if absent): tie to 1 | APB3+
PREADY is used by the Completer to extend the transfer duration. While PREADY is LOW during the Access phase, the transfer is frozen — all signals must remain stable and no state change occurs in either Requester or Completer.
Source: Completer | Width: 1 bit | Default (if absent): tie to 0 | APB3+
PSLVERR allows the Completer to signal that the transfer completed with an error. PSLVERR is only valid during the last cycle of the transfer — when PSELx, PENABLE, and PREADY are all HIGH simultaneously. Its value at any other time must be ignored by the Requester.
Key behavioural rules for PSLVERR:
Source: Requester | Width: 3 bits | Default (if absent): 3’b000 | APB4+
PPROT carries three independent protection attributes, one per bit:
| Bit | Name | LOW (0) | HIGH (1) |
|---|---|---|---|
PPROT[0] | Privilege | Normal access | Privileged access |
PPROT[1] | Security | Secure access | Non-secure access |
PPROT[2] | Type | Data access | Instruction access |
PPROT must be valid when PSELx is asserted and must remain stable throughout the transfer. The primary use is PPROT[1] for secure/non-secure gating — peripherals in the secure world can reject transactions with PPROT[1]=1 (non-secure).
PPROT is optional on both Requester and Completer. If the Requester has PPROT but the Completer does not, the signal is simply not connected — the Completer has no access protection and accepts all transactions. If the Completer has PPROT inputs but the Requester does not, compatibility requires that fixed protection attributes be functionally correct (i.e., tie PPROT to the appropriate default).
Source: Requester | Width: DATA_WIDTH/8 bits | APB4+
PSTRB enables sparse write data transfers — writing to only some byte lanes of a wide data bus. There is one PSTRB bit per 8-bit data lane: PSTRB[n] corresponds to PWDATA[(8n+7):(8n)].
Source: Requester | Width: 1 bit | APB5
PWAKEUP indicates any activity associated with the APB Requester interface. It is designed to be routed to a clock controller so that peripherals and their clock domains can be powered up before a transfer begins.
Critical requirements for PWAKEUP:
Source: Requester | Width: 1 bit | Property: RME_Support=True | APB5 RME
PNSE extends PPROT[1] to create a four-value physical address space selector. Combined with PPROT[1]:
| PNSE | PPROT[1] | Physical Address Space |
|---|---|---|
| 0 | 0 | Secure |
| 0 | 1 | Non-secure |
| 1 | 0 | Root |
| 1 | 1 | Realm |
PNSE is only present when RME_Support=True and only on APB5 interfaces. If present, PPROT must also be present. PNSE must be valid when PSELx is asserted.
APB5 All user signals are optional. If the associated width property is zero, the signal is absent.
| Signal | Source | Max Width | Valid When | Purpose |
|---|---|---|---|---|
PAUSER | Requester | 128 bits | PSELx asserted, same in Setup and Access | User-defined request attribute — attached to the address/control phase |
PWUSER | Requester | DATA_WIDTH/2 | PSELx and PWRITE asserted, same in Setup and Access | User-defined write data attribute |
PRUSER | Completer | DATA_WIDTH/2 | PSELx, PENABLE, PREADY asserted and PWRITE=0 | User-defined read data attribute |
PBUSER | Completer | 16 bits | PSELx, PENABLE, PREADY asserted | User-defined response attribute |
APB5 defines a complete set of parity check signals for safety-critical applications (ISO 26262, IEC 61508). Each check signal provides odd parity coverage for one or more payload signals. They are present only when the Check_Type interface property is set to Odd_Parity_Byte_All.
Parity rules:
| Check Signal | Signals Covered | Width | Check Enable Condition |
|---|---|---|---|
PADDRCHK | PADDR | ⌈ADDR_WIDTH/8⌉ | PSEL |
PCTRLCHK | PPROT, PWRITE, PNSE | 1 | PSEL |
PSELxCHK | PSELx | 1 | PRESETn |
PENABLECHK | PENABLE | 1 | PSEL |
PWDATACHK | PWDATA | DATA_WIDTH/8 | PSEL & PWRITE |
PSTRBCHK | PSTRB | 1 | PSEL & PWRITE |
PREADYCHK | PREADY | 1 | PSEL & PENABLE |
PRDATACHK | PRDATA | DATA_WIDTH/8 | PSEL & PENABLE & PREADY & !PWRITE |
PSLVERRCHK | PSLVERR | 1 | PSEL & PENABLE & PREADY |
PWAKEUPCHK | PWAKEUP | 1 | PRESETn |
PAUSERCHK | PAUSER | ⌈USER_REQ_WIDTH/8⌉ | PSEL |
PWUSERCHK | PWUSER | ⌈USER_DATA_WIDTH/8⌉ | PSEL & PWRITE |
PRUSERCHK | PRUSER | ⌈USER_DATA_WIDTH/8⌉ | PSEL & PENABLE & PREADY & !PWRITE |
PBUSERCHK | PBUSER | ⌈USER_RESP_WIDTH/8⌉ | PSEL & PENABLE & PREADY |
The APB spec (Appendix A) defines exactly when each signal must be valid. This is the complete ruleset:
| Signal | Source | Width | Version | Mandatory? | Description |
|---|---|---|---|---|---|
PCLK | Clock | 1 | APB2 | Yes | Clock — all signals sampled on rising edge |
PRESETn | System | 1 | APB2 | Yes | Active-LOW reset |
PADDR | Requester | ≤32 bits | APB2 | Yes | Byte address bus |
PSELx | Requester | 1 per Completer | APB2 | Yes | Peripheral select — one per Completer |
PENABLE | Requester | 1 | APB2 | Yes | Access phase indicator |
PWRITE | Requester | 1 | APB2 | Yes | Direction: 1=write, 0=read |
PWDATA | Requester | 8/16/32 | APB2 | Yes | Write data bus |
PRDATA | Completer | 8/16/32 | APB2 | Yes | Read data bus |
PREADY | Completer | 1 | APB3 | Optional (tie 1) | Ready — extends transfer when LOW |
PSLVERR | Completer | 1 | APB3 | Optional (tie 0) | Transfer error — valid only at completion |
PPROT[2:0] | Requester | 3 | APB4 | Optional | Protection: privilege, security, type |
PSTRB | Requester | DATA_W/8 | APB4 | Optional | Write byte-lane enables |
PWAKEUP | Requester | 1 | APB5 | Optional | Glitch-free activity indicator for clock gating |
PNSE | Requester | 1 | APB5 RME | Conditional | Realm Management Extension — Root/Realm selector |
PAUSER | Requester | ≤128 bits | APB5 | Optional | User request attribute |
PWUSER | Requester | ≤DATA_W/2 | APB5 | Optional | User write data attribute |
PRUSER | Completer | ≤DATA_W/2 | APB5 | Optional | User read data attribute |
PBUSER | Completer | ≤16 bits | APB5 | Optional | User response attribute |