Datasheet

Table Of Contents
NOTE
the event flag is "sticky", so if both processors send an event (SEV) simultaneously, and then both go to sleep (WFE), they
will both wake immediately, rather than getting stuck in a sleep state.
While in a WFE (or WFI) sleep state, the processor can shut off its internal clock gates, consuming much less power. When
both processors are sleeping, and the DMA is inactive, RP2040 as a whole can enter a sleep state, disabling clocks on
unused infrastructure such as the busfabric, and waking automatically when one of the processors wakes. See Section
2.10.2.
2.3.4. Debug
The 2-wire Serial Wire Debug (SWD) port provides access to hardware and software debug features including:
Loading firmware into SRAM or external flash memory
Control of processor execution: run/halt, step, set breakpoints, other standard Arm debug functionality
Access to processor architectural state
Access to memory and memory-mapped IO via the system bus
The SWD bus is exposed on two dedicated pins and is immediately available after power-on.
Debug access is via independent DAPs (one per core) attached to a shared multidrop SWD bus (SWD v2). Each DAP will
only respond to debug commands if correctly addressed by a SWD TARGETSEL command; all others tristate their outputs.
Additionally, a Rescue DP (see section Section 2.3.4.2) is available which is connected to system control features. Default
addresses of each debug port are given below:
Core 0: 0x01002927
Core 1: 0x11002927
Rescue DP: 0xf1002927
The Instance IDs (top 4 bits of ID above) can be changed via a sysconfig register which may be useful in a multichip
application. However note that ID=0xf is reserved for the internal Rescue DP (see section Section 2.3.4.2).
IO
Processors
Core0
DAP_0
DP-0 AP
Core1
SWD
Multidrop
arbiter
Rescue DP
SWD
SWCLK
SWDIO
DAP_1
DP-1 AP
sys_cfg.proc0_dap_instid
sys_cfg.proc1_dap_instidpam_restart
SWD
SWD
SWD
Figure 10. RP2040
Debugging
TO DO: LIAM: Link to getting started book for practical use of how to do this
2.3.4.1. Software control of SWD pins
The SWD pins for Core 0 and Core 1 can be bit-banged via registers in syscfg (see DBGFORCE). This means that Core 1
could run a USB application that allows debug of Core 0, or similar.
2.3.4.2. Rescue DP
The Rescue DP (debug port) is available over the SWD bus and is only intended for use in the specific case where the chip
RP2040 Datasheet
2.3. Processor subsystem 76