Tutorials

Protocols

Learn More

The APB state machine has three states:

  1. IDLE
  2. SETUP
  3. ACCESS
apb-operating-state-machine

IDLE

IDLE is the default state. No transfer is active, and PSELx is LOW.

SETUP

When a transfer is required, the interface enters SETUP. In this state:

  • PSELx is HIGH for the selected Completer.
  • PENABLE is LOW.
  • Address, direction, and request-side transfer information are valid.

SETUP lasts one clock cycle and then moves to ACCESS.

ACCESS

In ACCESS:

  • PSELx remains HIGH.
  • PENABLE is HIGH.
  • The Completer controls completion using PREADY.

If PREADY is LOW, the interface stays in ACCESS. If PREADY is HIGH, the transfer completes and the interface either returns to IDLE or moves directly to SETUP for the next transfer.

State transition summary

FromToCondition
IDLESETUPNew transfer requested
SETUPACCESSNext rising clock edge
ACCESSACCESSPREADY=0
ACCESSIDLEPREADY=1 and no next transfer
ACCESSSETUPPREADY=1 and another transfer follows