2.13. Power-On State Machine
2.13.1. Overview
The power-on state machine removes the reset from various hardware blocks in a specific order. Each peripheral in the power-on state machine is controlled by an internal
rst_n active-low reset signal and generates an internal
rst_done active-high reset done signal. The power-on state machine deasserts the reset to each peripheral, waits for that peripheral to assert its
rst_done and then deasserts the reset to the next peripheral. An important use of this is to wait for a clock source to be running cleanly in the chip before the reset to the clock generators is deasserted. This avoids potentially glitchy clocks being distributed to the chip.
The power-on state machine is itself taken out of reset when the Chip-Level Reset subsystem confirms that the digital core supply (DVDD) is powered and stable, and the
RUN pin is high. The power-on state machine takes a number of other blocks out of reset at this point via its
rst_n_run output. This is used to reset things that need to be reset at start-up but must not be reset if the power-on state machine is restarted. This list includes:
- • Power on logic in the ring oscillator and crystal oscillator
- • Clock dividers which must keep on running during a power-on state machine restart (
clk_refandclk_sys) - • Watchdog (contains scratch registers which need to persist through a soft-restart of the power-on state machine)
2.13.2. Power On Sequence
Figure 27. Power-On State Machine Sequence.

graph TD
A[Chip Level Reset Released] --> B[Ring Oscillator]
B --> C[Crystal Oscillator]
C --> D[Clock Generators]
D --> E[Reset Controller]
E --> F[Bus Fabric]
F --> G[ROM / SRAM]
G --> H[XIP (Execute-In-Place)]
H --> I[Chip Level Reset and Voltage Regulator Registers]
I --> J[Processor Complex]
The power-on state machine sequence is as follows:
- • Chip-Level Reset subsystem deasserts power-on state machine reset once digital core supply (DVDD) is powered and stable, and RUN pin is high ( rst_n_run is also deasserted at this point)
- • Ring Oscillator is started. rst_done is asserted once the ripple counter has seen a sufficient number of clock edges to indicate the ring oscillator is stable
- • Crystal Oscillator reset is deasserted. The crystal oscillator is not started at this point, so rst_done is asserted instantly.
- • clk_ref and clk_sys clock generators are taken out of reset. In the initial configuration clk_ref is running from the ring oscillator with no divider. clk_sys is running from clk_ref . These clocks are needed for the rest of the sequence to progress.
The rest of the sequence is fairly simple, with the following coming out of reset in order one by one:
- • Reset Controller - used to reset all non-boot peripherals
- • Chip-Level Reset and Voltage Regulator registers - used by the bootrom to check the boot state of the chip. In particular, the PSM_RESTART_FLAG flag in the CHIP_RESET register can be set via SWD to indicate to the boot code that there is bad code in flash and it should stop executing. The reset state of the CHIP_RESET register is determined by the Chip-Level Reset subsystem and is not affected by reset coming from the power-on state machine
- • XIP (Execute-In-Place) - used by the bootrom to execute code from an external SPI flash
- • ROM and SRAM - Boot code is executed from the ROM. SRAM is used by processors and Bus Fabric.
- • Bus Fabric - Allows the processors to communicate with peripherals
- • Processor complex - Finally the processors can start running
The final thing to come out of reset is the processor complex. This includes both core0 and core1 . Both cores will start executing the bootcode from ROM. One of the first things the bootrom does is read the core id. At this point, core1 will go to sleep leaving core0 to continue with the bootrom execution. The processor complex has its own reset control and various low-power modes which is why both the core0 and core1 resets are deasserted, despite only core0 being needed for the bootrom.
2.13.3. Register Control
The power-on state machine is a fully automated piece of hardware. It requires no input from the user to work. There are register controls that can be used to override and see the status of the power-on state machine. This allows hardware blocks in the power-on state machine to be reset by software if necessary. There is also a WDSSEL register which is used to control what is reset by a Watchdog reset.
2.13.4. Interaction with Watchdog
The power-on state machine can be restarted from a software-programmable position if the Watchdog fires. For example, in the case the processor is stuck in an infinite loop, or the programmer has somehow misconfigured the chip. It is important to note that if a peripheral in the power-on state machine has the WDSSEL bit set, every peripheral after it in the power-on sequence will also be reset because the rst_done of the selected peripheral will be deasserted, asserting rst_n for the remaining peripherals.
2.13.5. List of Registers
The PSM registers start at a base address of 0x40010000 (defined as PSM_BASE in SDK).
Table 196. List of PSM registers
| Offset | Name | Info |
|---|---|---|
| 0x0 | FRCE_ON | Force block out of reset (i.e. power it on) |
| 0x4 | FRCE_OFF | Force into reset (i.e. power it off) |
| 0x8 | WDSEL | Set to 1 if this peripheral should be reset when the watchdog fires. |
| 0xc | DONE | Indicates the peripheral's registers are ready to access. |
PSM: FRCE_ON Register
Offset: 0x0
Description
Force block out of reset (i.e. power it on)
Table 197. FRCE_ON Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:17 | Reserved. | - | - |
| 16 | PROC1 | RW | 0x0 |
| 15 | PROC0 | RW | 0x0 |
| 14 | SIO | RW | 0x0 |
| 13 | VREG_AND_CHIP_RESET | RW | 0x0 |
| 12 | XIP | RW | 0x0 |
| 11 | SRAM5 | RW | 0x0 |
| 10 | SRAM4 | RW | 0x0 |
| 9 | SRAM3 | RW | 0x0 |
| 8 | SRAM2 | RW | 0x0 |
| 7 | SRAM1 | RW | 0x0 |
| 6 | SRAM0 | RW | 0x0 |
| 5 | ROM | RW | 0x0 |
| 4 | BUSFABRIC | RW | 0x0 |
| 3 | RESETS | RW | 0x0 |
| 2 | CLOCKS | RW | 0x0 |
| 1 | XOSC | RW | 0x0 |
| 0 | ROSC | RW | 0x0 |
PSM: FRCE_OFF Register
Offset: 0x4
Description
Force into reset (i.e. power it off)
Table 198. FRCE_OFF Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:17 | Reserved. | - | - |
| 16 | PROC1 | RW | 0x0 |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 15 | PROC0 | RW | 0x0 |
| 14 | SIO | RW | 0x0 |
| 13 | VREG_AND_CHIP_RESET | RW | 0x0 |
| 12 | XIP | RW | 0x0 |
| 11 | SRAM5 | RW | 0x0 |
| 10 | SRAM4 | RW | 0x0 |
| 9 | SRAM3 | RW | 0x0 |
| 8 | SRAM2 | RW | 0x0 |
| 7 | SRAM1 | RW | 0x0 |
| 6 | SRAM0 | RW | 0x0 |
| 5 | ROM | RW | 0x0 |
| 4 | BUSFABRIC | RW | 0x0 |
| 3 | RESETS | RW | 0x0 |
| 2 | CLOCKS | RW | 0x0 |
| 1 | XOSC | RW | 0x0 |
| 0 | ROSC | RW | 0x0 |
PSM: WDSSEL Register
Offset: 0x8
Description
Set to 1 if this peripheral should be reset when the watchdog fires.
Table 199. WDSSEL Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:17 | Reserved. | - | - |
| 16 | PROC1 | RW | 0x0 |
| 15 | PROC0 | RW | 0x0 |
| 14 | SIO | RW | 0x0 |
| 13 | VREG_AND_CHIP_RESET | RW | 0x0 |
| 12 | XIP | RW | 0x0 |
| 11 | SRAM5 | RW | 0x0 |
| 10 | SRAM4 | RW | 0x0 |
| 9 | SRAM3 | RW | 0x0 |
| 8 | SRAM2 | RW | 0x0 |
| 7 | SRAM1 | RW | 0x0 |
| 6 | SRAM0 | RW | 0x0 |
| 5 | ROM | RW | 0x0 |
| 4 | BUSFABRIC | RW | 0x0 |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 3 | RESETS | RW | 0x0 |
| 2 | CLOCKS | RW | 0x0 |
| 1 | XOSC | RW | 0x0 |
| 0 | ROSC | RW | 0x0 |
PSM: DONE Register
Offset: 0xc
Description
Indicates the peripheral's registers are ready to access.
Table 200. DONE Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:17 | Reserved. | - | - |
| 16 | PROC1 | RO | 0x0 |
| 15 | PROC0 | RO | 0x0 |
| 14 | SIO | RO | 0x0 |
| 13 | VREG_AND_CHIP_RESET | RO | 0x0 |
| 12 | XIP | RO | 0x0 |
| 11 | SRAM5 | RO | 0x0 |
| 10 | SRAM4 | RO | 0x0 |
| 9 | SRAM3 | RO | 0x0 |
| 8 | SRAM2 | RO | 0x0 |
| 7 | SRAM1 | RO | 0x0 |
| 6 | SRAM0 | RO | 0x0 |
| 5 | ROM | RO | 0x0 |
| 4 | BUSFABRIC | RO | 0x0 |
| 3 | RESETS | RO | 0x0 |
| 2 | CLOCKS | RO | 0x0 |
| 1 | XOSC | RO | 0x0 |
| 0 | ROSC | RO | 0x0 |