Datasheet

Table Of Contents
2.10.5.2. Dormant
The hello_dormant example, https://github.com/raspberrypi/pico-examples/tree/pre_release/sleep/hello_dormant/
hello_dormant.c, demonstrates dormant mode. The example takes the following steps:
Run all clocks in the system from XOSC
Configure a GPIO interrupt for the "dormant_wake" hardware which can wake both the ROSC and XOSC from
dormant mode
Put the XOSC into dormant mode which stops all processor execution (and all other clocked logic on the chip)
immediately
When GPIO 10 goes high, the XOSC is started again and execution of the program continues
hello_dormant uses sleep_goto_dormant_until_pin under the hood:
Pico SDK: https://github.com/raspberrypi/pico-sdk/tree/pre_release/src/rp2_common/hardware_sleep/sleep.c Lines 132 - 153
132 void sleep_goto_dormant_until_pin(uint gpio_pin, bool edge, bool high) {
133 bool low = !high;
134 bool level = !edge;
135
136 // Configure the appropriate IRQ at IO bank 0
137 assert(gpio_pin <= NUM_BANK0_GPIO);
138
139 uint32_t event = 0;
140
141 if (level && low) event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_BITS;
142 if (level && high) event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_BITS;
143 if (edge && high) event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_BITS;
144 if (edge && low) event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_BITS;
145
146 gpio_set_dormant_irq_enabled(gpio_pin, event, true);
147
148 _go_dormant();
149 // Execution stops here until woken up
150
151 // Clear the irq so we can go back to dormant mode again if we want
152 gpio_acknowledge_irq(gpio_pin, event);
153 }
2.11. Chip-Level Reset
2.11.1. Overview
The chip-level reset subsystem resets the whole chip, placing it in a default state. This happens at initial power-on, during
a power supply brown-out event or when the chip’s RUN pin is taken low. The chip can also be reset via the Rescue Debug
Port. See Section 2.3.4.2, “Rescue DP” for details.
The subsystem has two reset outputs. rst_n_psm, which resets the whole chip, except the debug port, and rst_n_dp, which
only resets the Rescue DP. Both resets are held low at initial power-on, during a brown-out event or when RUN is low.
rst_n_psm can additionally be held low by the Rescue DP via the subsystem’s psm_restart input. This allows the chip to be
reset via the Rescue DP without resetting the Rescue DP itself. The subsystem releases chip level reset by taking
rst_n_psm high, handing control to the Power-on State Machine, which continues to start up the chip. See Power-On State
Machine for details.
The chip level reset subsystem is shown in Figure 19, and more information is available in the following sections.
RP2040 Datasheet
2.11. Chip-Level Reset 147