80. Debug support (DBG)

80.1 DBG introduction

A comprehensive set of debug features is provided to support software development and system integration:

The debug features can be controlled via a JTAG/serial-wire debug access port, using industry standard debugging tools.

A trace port allows data to be captured for logging and analysis.

The debug features are based on the following Arm CoreSight components:

These components are described in Section 80.9. More information can be found in the Arm documents referenced in Section 80.15.

80.2 DBG use cases

The trace and debug system are designed to support a variety of typical use cases:

80.3 DBG block diagram

Figure 1017. Block diagram of debug support infrastructure

Block diagram of debug support infrastructure showing Dap Layer, Cortex-M33 core, Cortex-A35MP core, and CSEM components.

The diagram illustrates the debug support infrastructure, organized into four main functional blocks: Dap Layer, Cortex-M33 core, Cortex-A35MP core, and CSEM.

Interconnections include DAPBUS, AHB, APB-D, CTM (cross trigger matrix), and various trace outputs: Serial wire trace port (TRACESWO), Trace port (TRACECK, TRACED[15:0]).

Legend:
↔ APB-D (system debug bus)
↔ DAPBUS
→ ATB (trace bus)
- - -> CTM (cross trigger matrix)
- - - -> Timestamp

MSv73108V2

Block diagram of debug support infrastructure showing Dap Layer, Cortex-M33 core, Cortex-A35MP core, and CSEM components.

1. Arm CoreSight component.

80.4 DBG pins

Table 896. JTAG/Serial-wire debug port pins

Pin nameJTAG debug portSWD debug portPin assignment
TypeDescriptionTypeDescription
JTMS/SWDIOIJTAG test mode selectI/OSerial-wire data in/out-
JTCK/SWCLKIJTAG test clockISerial-wire clock-
JTDIIJTAG test data input---
JTDOOJTAG test data output---
NJTRSTIJTAG test reset---

Table 897. Trace port pins

Pin nameTypeDescriptionPin assignment
TRACED[15:0]OTrace synchronous data out (can be 1, 2, 4, 8 or 16 pins)Refer to Datasheet
TRACECLKOTrace clock

Table 898. Serial-wire trace port pins

Pin nameTypeDescriptionPin assignment
TRACESWOOTrace asynchronous data out(1)
  1. 1. TRACESWO is multiplexed with JTDO. This means that single-wire trace is only available when using the JTAG port in serial-wire debug interface mode, not when using JTAG.

Table 899. Trigger pins

Pin nameTypeDescriptionPin assignment
DBTRGIIExternal trigger input to CTIRefer to Datasheet
DBTRGOOExternal trigger output from CTI

80.5 DBG power and clocking

80.5.1 DBG power domains

All debug components except the SWJ-DP are in the \(V_{DDCORE}\) power domain.

The SWJ-DP is located in the \(V_{DD}\) power domain, and as such is powered in all modes but the \(V_{BAT}\) one. This means that the debugger is able to wake the device up from Standby modes.

80.5.2 DBG clocks

Figure 1018. Debug clock domains Figure 1018: Debug clock domains. This block diagram illustrates the clock domains and interconnections for the debug support in the RM0506. The diagram is divided into four main clock domains: JTAG/SW tck (grey), ck_dap (red), ck_mcu2 (yellow), and ck_sys_dbg (green). The JTAG/SW tck domain includes the JTAG/Serial-wire port and SWJ-DP1. The ck_dap domain contains the DBG_MCU, which is connected to the SWJ-DP1 via an asynchronous bridge. The ck_mcu2 domain includes the Cortex-M33 core, DWT1, FPB1, ITM1, ROM table1, CTI1, and ETM1. The ck_mcu1 domain includes the Cortex-A35 core, CTI1, and ETM1. The ck_sys_dbg domain includes the System bus matrix, APB mux, ROM table1, Timestamp generator, STM5001, Funnel1, SWO1, ETF1, SRAM, ETR1, Replicator, and TPIU1. Various buses and interfaces are shown, including APB-D, DAPBUS, AHB, PPB, and CTM. A legend on the right defines the line styles for different bus types: APB-D (system debug bus), DAPBUS, ATB (trace bus), CTM (cross trigger matrix), and Timestamp.
Figure 1018: Debug clock domains. This block diagram illustrates the clock domains and interconnections for the debug support in the RM0506. The diagram is divided into four main clock domains: JTAG/SW tck (grey), ck_dap (red), ck_mcu2 (yellow), and ck_sys_dbg (green). The JTAG/SW tck domain includes the JTAG/Serial-wire port and SWJ-DP1. The ck_dap domain contains the DBG_MCU, which is connected to the SWJ-DP1 via an asynchronous bridge. The ck_mcu2 domain includes the Cortex-M33 core, DWT1, FPB1, ITM1, ROM table1, CTI1, and ETM1. The ck_mcu1 domain includes the Cortex-A35 core, CTI1, and ETM1. The ck_sys_dbg domain includes the System bus matrix, APB mux, ROM table1, Timestamp generator, STM5001, Funnel1, SWO1, ETF1, SRAM, ETR1, Replicator, and TPIU1. Various buses and interfaces are shown, including APB-D, DAPBUS, AHB, PPB, and CTM. A legend on the right defines the line styles for different bus types: APB-D (system debug bus), DAPBUS, ATB (trace bus), CTM (cross trigger matrix), and Timestamp.

1. Arm CoreSight component.

The debugger supplies the clock for the debug port, SWTCLK, via the debug interface pin, JTCK/SWCLK. This clock is used to register the serial input data in both serial-wire and JTAG mode, as well as to operate the state machines and internal logic of the debug port. It must therefore continue to toggle for several cycles after the end of an access, to ensure that the debug port returns to the idle state.

The SWJ-DP contains an asynchronous interface to the system DAP clock domain, CK_DAP. The DBGMCU is in this domain.

CK_DAP is activated with the CDBGPWRUPREQ control bit from SWJDP. When the debugger connects, it raises this control activating the clock for the DBGMCU even if the system reset is asserted. In case no debugger is connected and the CPU want to access the DBGMCU, a register inside RCC can enable this clock. The debug APB bus is clocked by CK_SYS_DBG. It is accessed from SWJ-DP through an asynchronous bridge. As CK_SYS_DBG is not enabled when system reset is asserted, the APB debug is not accessible, nor are any of the coresight components. As a consequence, the debugger discovery is not supported.

The trace subsystem (that is all components on the ATB) is in the CK_SYS_ATB trace domain.

CK_SYS_DBG and the CK_SYS_ATB clocks are enabled by the debugger using CDBGPWRUPREQ in debug port CTRL/STAT register. They can also be enabled by software writing to a register in the RCC. The clocks must be enabled before the debugger or software can access any of the debug features on the device. They must be disabled when debug and trace are not used to avoid wasting energy.

The trace port (TPIU) output clock, TRACECLK, is generated by the flexible clock generator that can be programmed to match the capability of the IO ports. The same clock is used to drive the serial wire output (SWO).

Note: TRACECLK is enabled in the RCC. It must be activated whenever tracing is required, even if neither the TPIU nor the SWO are active (that is when using the embedded trace FIFO as a software buffer). This is to avoid filling up the SWO FIFO which would then block the trace output from the ITM in the Cortex-M33.

The debug and trace components included in the processors (such as ETM, ITM, DWG, FPB, CTI) are clocked with the corresponding core clock (CK_CPU1_SS for the Cortex-A35 subsystem, CK_CPU2_SS for the Cortex-M33 subsystem).

80.5.3 Debug and low-power modes

The device includes power saving features which allow the various domain clocks and even the core power to be switched off when not required. If the core power is switched off (Standby mode), or the system debug domain is not clocked (Stop mode), all debug components are inaccessible to the debugger. To avoid this, power saving mode emulation is implemented. If emulation is enabled, the device still enters the programmed low-power mode, but its clock and power are maintained. In other words, the domain behaves as if it is in low-power mode, but the debugger does not lose the connection.

The Emulation mode is programmed in the MCU debug (DBGMCU) unit. For more information, refer to the Section 80.9.11: Microcontroller debug unit (DBGMCU).

If the device is in Stop or Standby mode without emulation, and the debugger wishes to wake the system up, it can do so by asserting the CDBGPWRUPREQ bit in debug port CTRL/STAT register. This restarts the clocks (and switches on the high power regulator if needed) but does not generate any interrupt or event to either processor core. When the wake-up has completed, CDBGPWRUPACK in the same register goes high. In this state the debugger can access the memories and peripheral registers, and trigger a wake-up of the CPU if required.

80.5.4 Debug reset

The debug components, except for the debug port, are reset by their respective clock domain resets. The debug port (SWJ-DP) is reset by a power-on reset of the always-on domain only. The access ports can be reset under debugger control, using CDBGRSTREQ/ACK in the CTRL/STAT register of the debug port.

The debugger sets CDBGRSTREQ to request a reset. It then polls CDBGRSTACK until it goes high, indicating that the reset has completed, following which it deasserts CDBGRSTREQ.

80.6 Security

The trace and debug components allow a high degree of access to the processor and system during product development. In order to protect user code and ensure that the debug features cannot be used to alter or compromise the normal operation of the finished product, these features can be disabled, or limited in scope. For example, secure software debug and trace can be disabled without preventing the debug of nonsecure code.

80.6.1 Authentication signals

The following authentication signals are used by a CoreSight system to determine which features are enabled or disabled:

The Cortex-A35 and Cortex-M33 have independent sets of authentication signals to allow their debug capabilities to be set individually for each core.

The table below lists which signals apply to which debug and trace components.

Table 900. Authentication signal connectivity

-AP_UNLOCKDEVICEENDBGENSPIDENNIDENSPNIDENDBGSWEN
DBGMCU APB-APX(1)------
Debug APB-AP-X-----
System bus AXI-AP-X-X---
Cortex-M33 AHB-AP-X-X(2)---
Cortex-M33 DWT/FPB/SCS/ITM--X(2)X(2)X(2)X(2)-
Cortex-M33 ETM--X(2)----
Cortex-M33 CTI--X(2)-X(2)--
Cortex-A35 debug unit--X(3)X(3)X(3)X(3)X
Cortex-A35 ETM--X(3)-X(3)-X
Cortex-A35 CTI--X(3)-X(3)-X
STM500--X(2)(3)X(2)(3)X(2)(3)X(2)(3)X
ETF------X
ETR--XX--X
TSGEN------X
TPIU------X
  1. 1. DBGMCU_APB_AP is open under reset, closed immediately after SYSTEM_RST is released, until AP_UNLOCKED is configured.
  2. 2. Cortex-M33 dedicated subset of authentication signals.
  3. 3. Cortex-A35 dedicated subset of authentication signals.

For detailed information on the behavior of each component according to the state of the authentication signals, refer to the relevant component section, or to the relevant Arm technical documentation.

The initial states of the signals are set at power-on reset, according to the table below. States of the signals can be modified in BSEC_DENR and AP_UNLOCK registers after boot-up by a trusted software with secure and privilege access rights.

Refer to Section 6: Boot and security control (BSEC), in the debug and trace control sections, for more details on the various combinations allowed for these signals.

Table 901. Authentication signal initial states

Device state (set by OTP fuse)Authentication signal default stateDescription
Open deviceAll onesAll debug and trace is enabled at boot-up.
Closed deviceAll zerosAll debug and trace is disabled at boot-up. Secure software must enable debug as required after booting.

In addition to the functional bits of BSEC_DENR, an error detection code is transmitted by BSEC. An error detection logic is located close to the debug components with a permanent check between functional bits and error detection code. If the values do not correspond, a security tamper is generated. This tamper can be configured to generate a reset, preventing any security issue.

80.7 Chip-level TAP controller (CLTAPC)

The JTAG interface is connected to the internal scan chain of the device. It is used for testing as well as for debug. The first component in the scan chain is the chip-level TAP controller which implements a TAP state machine based on IEEE Std 1149.1-1990. It allows access to the built-in manufacturing test features.

The CLTAPC must be bypassed in order to access the debug support functions provided by the SWJ-DP. The bypass is done by prefixing the SWJ-DP instructions with the CLTAPC bypass instruction sequence (0b11111).

The CLTAPC also contains three 16-bit registers which can be accessed using the CTRL instruction sequence (0b01000) followed by 0b1111 to bypass the SWJ-DP.

Next, the register address is shifted into the DR (LSB first). Finally, the 16-bit register content is shifted into or out of the DR, according to whether the register is read or write.

The CLTAPC registers are listed in the table below.

Table 902. CLTAPC registers

NameAddressDescriptionread/write
SECSTS0b001Status of BSEC_DENR registerR
DBGCTL0b010Connected to BSEC_JTAGINR registerW
DBGSTS0b011Connected to BSEC_JTAGOUTR registerR

For details on BSEC register bits, refer to Section 6.3.14: JTAG registers.

80.8 Serial-wire and JTAG debug port (SWJ-DP)

The SWJ-DP is a CoreSight component that implements an external access port for connecting debugging equipment.

Two types of interface can be configured:

The two modes are mutually exclusive, since they share the same I/O pins.

By default, the JTAG-DP is selected after a system or power-on reset. The five I/O pins are configured by hardware in debug alternative function mode. The SWJ-DP incorporates pull-up resistors on JTDI, JTMS/SWDIO, and NJTRST, as well as a pull-down resistor on JTCK/SWCLK.

A debugger can select the SW-DP by transmitting the following serial data sequence on JTMS/SWDIO:

...(50 or more ones)....0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,...(50 or more ones)...

JTCK/SWCLK must be cycled for each data bit.

In SW-DP mode, the unused JTAG pins JTDI, JTDO and NJTRST can be used for other functions.

Note: All SWJ port I/Os can be reconfigured to other functions by software, but debugging is no longer possible.

80.8.1 JTAG debug port

The JTAG-DP implements a TAP state machine (TAPSM) based on IEEE Std 1149.1-1990.

For more details on the JTAG debug protocol, refer to the Arm debug interface Architecture specification [1].

80.8.2 SWD debug port

The serial-wire debug protocol uses the two following pins:

Serial data is transferred LSB first, synchronously with the clock. A transfer comprises the following phases:

For more details on the serial wire debug protocol, refer to the Arm debug interface Architecture Specification [1].

Note: The SWJ-DP implements SWD protocol version 2.

80.8.3 Access ports

There are four access ports (AP) attached to the DP.

Figure 1019. Debug and access port connections

Block diagram of Debug and access port connections. JTAG/SWD connects to SWJ-DP. SWJ-DP connects to DAPBUS. DAPBUS connects to four access ports: AP0 (APB-AP) connected to DBGMCU, AP1 (APB-AP) connected to Debug bus (APB), AP2 (AXI-AP) connected to System interconnect (AXI), and AP3 (AHB-AP) connected to Cortex-M33. The diagram is labeled MSv73110V1 in the bottom right corner.
graph LR
    JTAG[JTAG/SWD] <--> SWJ[SWJ-DP]
    SWJ <--> DAPBUS[DAPBUS]
    DAPBUS --> AP0[AP0
(APB-AP)] DAPBUS --> AP1[AP1
(APB-AP)] DAPBUS --> AP2[AP2
(AXI-AP)] DAPBUS --> AP3[AP3
(AHB-AP)] AP0 <--> DBGMCU[DBGMCU] AP1 <--> DebugBus[Debug bus (APB)] AP2 <--> SystemInterconnect[System interconnect (AXI)] AP3 <--> CortexM33[Cortex-M33]

MSv73110V1

Block diagram of Debug and access port connections. JTAG/SWD connects to SWJ-DP. SWJ-DP connects to DAPBUS. DAPBUS connects to four access ports: AP0 (APB-AP) connected to DBGMCU, AP1 (APB-AP) connected to Debug bus (APB), AP2 (AXI-AP) connected to System interconnect (AXI), and AP3 (AHB-AP) connected to Cortex-M33. The diagram is labeled MSv73110V1 in the bottom right corner.
  1. 1. AP0: DBGMCU access port (APB-AP). Allows access to DBGMCU only.
  2. 2. AP1: Debug access port (APB-AP). Allows access to the CoreSight™ components on the debug APB bus, including the Cortex-A35.
  3. 3. AP2: System bus access port (AXI-AP). Allows access to the system bus matrix. This provides visibility on all the memory and peripherals accessible via the AXI and AHB interconnects, except those on the system APB debug bus. No CoreSight™ components are accessible via this port.
  4. 4. AP3: Cortex-M33 access port (AHB-AP). Allows access to the debug and trace features integrated in the Cortex-M33 processor core via its PPB bus.

All four access ports are of type MEM-AP: debug and trace component registers are mapped in the address space of the associated debug bus. The AP is seen by the debugger as a set of 32-bit registers organized in banks of four registers each. Some of these registers are used to configure or monitor the AP itself, while others are used to perform a transfer on the bus.

For more detailed information on the MEM-AP, refer to the Arm debug interface architecture specification [1].

80.8.4 Authentication

The effect of the authentication signals for each access port is shown in the tables below.

Table 903. AP0 (DBGMCU APB) authentication behavior

Device stateAP_UNLOCKCPU write once any value in authentication device registerAP statusDBGMCU register authorized registers
Power reset released, system reset asserted0NAAP openedDeviceld, DENABLE, all authentication registers accessible
System reset released, opened partB4Yes or noAP openedAll registers accessible
System reset released, closed partB4Yes or noAP openedAll registers accessible
System reset released, closed partOthersNoAP closedNA
System reset released, closed partOthersYesAP openedAuthorized registers:
Deviceld, DENABLE, all authentication registers
Locked registers:
debug control, freeze registers

Table 904. AP1 (debug APB) authentication behavior

DEVICEENOthers authentication signalsBehavior
0XAll access blocked.
1-All access enabled.
Note: Access to certain components may return an error depending on the state of the other authentication signals.

Table 905. AP2-3 authentication behavior

DEVICEENSPIDENOthers authentication signalsBehavior
0XXAll transfers blocked. Any attempt to perform a transfer will result in an error.
10-Secure transfers blocked. Any attempt to perform a secure transfer will result in an error. Nonsecure transfers are enabled.
11-Both nonsecure and secure transfers are enabled.

80.9 System debug features

The system debug features include the following CoreSight components:

These components are accessible by the debugger via the system APB-AP and its associated APB debug bus. They are also accessible from the Cortex-A35 and Cortex-M33 processors to the extent that self-hosted feature is enabled.

The MCU debug unit (DBGMCU) is also accessed via the debug APB. This non-CoreSight component contains registers for configuring the behavior of the device in debug mode.

80.9.1 System ROM tables

There is one main ROM table on the debug APB bus. The ROM table is a CoreSight component that contains the base addresses of CoreSight debug components on APB bus. This table allows a debugger to discover automatically the CoreSight system topology.

The ROM table points to the CoreSight components located in the debug subsystem, and to a secondary ROM table in the Cortex-A35 subsystem.

The table occupies a 4-Kbyte, 32-bit wide chunk of APB address space:

Each component referenced in the ROM table occupies a 64-Kbyte range.

Table 906. Debug subsystem ROM table

Address offset in ROM tableComponent nameComponent base address (system bus)Component base address (debugger)Component address offsetData
0x000Funnel0x4A01 00000x8001 00000x100000x0001 0003
0x004ETF0x4A02 00000x8002 00000x200000x0002 0003
0x008ETR0x4A03 00000x8003 00000x300000x0003 0003
0x00CTPIU0x4A04 00000x8004 00000x400000x0004 0003
0x010Replicator0x4A05 00000x8005 00000x500000x0005 0003
0x014Timestamp generator0x4A06 00000x8006 00000x600000x0006 0003
Table 906. Debug subsystem ROM table (continued)
Address offset in ROM tableComponent nameComponent base address (system bus)Component base address (debugger)Component address offsetData
0x018STM5000x4A07 00000x8007 00000x700000x0007 0003
0x01CCTI00x4A08 00000x8008 00000x800000x0008 0003
0x020CTI10x4A09 00000x8009 00000x900000x0009 0003
0x024SWO0x4A0A 00000x800A 00000xA00000x000A 0003
0x028Cortex-A35 ROM table0x4A20 00000x8020 00000x2000000x0020 0003
0x02CTop of table---0x0000 0000
0x030 to 0xFC8Reserved---0x0000 0000
0xFCC to 0xFFCROM table registers----

The secondary ROM table below lists the debug components attached to the Cortex-A35 processors. It occupies a 4-Kbyte, 32-bit wide chunk of APB address space:

Table 907. Cortex-A35 subsystem ROM table
Address offset in ROM tableComponent nameComponent base address (system bus)Component base address (debugger)Component address offsetEntry
0x000CA35_0_DBG0x4A21 00000x8021 00000x1 00000x0001 0003
0x004CA35_0_CTI0x4A22 00000x8022 00000x2 00000x0002 0003
0x008CA35_0_PMU0x4A23 00000x8023 00000x3 00000x0003 0003
0x00CCA35_0_ETM0x4A24 00000x8024 00000x4 00000x0004 0003
0x010Top of table---0x0000 0000
0x014 to 0xFC8Reserved---0x0000 0000
0xFCC to 0xFFCROM table registers----

Finally, there is a ROM table on DBGMCU APB-AP at address 0x8000 0000 that points to the DBGMCU component. This ROM table is accessible only by the debugger, while the DBGMCU is accessible by both debugger and CPU.

Table 908. DBGMCU ROM table
Address offset in ROM tableComponent nameComponent base address (system bus)Component base address (debugger)Component address offsetData
0x000DBGMCU0x440A 00000x8000 10000x10000x0000 1003

For more information on these ROM tables, refer to the Arm Debug Interface Architecture Specification [1].

The topology for the CoreSight™ components on the debug APB is shown in Figure 1020.

Figure 1020. CoreSight™ components topology

Figure 1020. CoreSight components topology block diagram showing the connections and offset mappings from the Debug Subsystem ROM table and Cortex-A35 ROM table to various CoreSight component blocks (Trace Funnel, Trace FIFO, Embedded Trace Router, Trace Port Interface, Replicator, Timestamp Generator, System Trace Macrocell, System CTI0, System CTI1, Serial Wire Output, C-A35_0 Debug, C-A35_0 PMU, C-A35_0 CTI, C-A35_0 ETM).

The diagram illustrates the CoreSight components topology, showing the mapping between ROM tables and hardware components. The components and their base addresses are:

Each component block contains: Register file base (0x000), PIDR4 (0xFD0), and CIDR3 (0xFFC).

Figure 1020. CoreSight components topology block diagram showing the connections and offset mappings from the Debug Subsystem ROM table and Cortex-A35 ROM table to various CoreSight component blocks (Trace Funnel, Trace FIFO, Embedded Trace Router, Trace Port Interface, Replicator, Timestamp Generator, System Trace Macrocell, System CTI0, System CTI1, Serial Wire Output, C-A35_0 Debug, C-A35_0 PMU, C-A35_0 CTI, C-A35_0 ETM).

MSv73113V2

80.9.2 CoreSight global timestamp generator (TSGEN)

The CoreSight global timestamp generator contains a 64-bit counter that provides a common timing reference for all trace sources in the system (ETM, ITM and STM). These components insert timestamps in the trace streams that allow the trace analyzer to recover

the chronological order of trace packets, which can be lost when multiple trace sources are multiplexed into one stream at the funnel.

TSGEN registers are accessible over the debug APB. This allows the debugger or debug software to perform the following tasks:

For more information on the TSGEN CoreSight component, refer to the Arm CoreSight SoC-400 technical reference manual [2].

The timestamp generator has its own clock domain CK_KER_TSGEN, and is distributed to the Cortex-A35 and Cortex-M33 to provide a time information for their respective trace macrocell, and to the STM to provide a time information for stamping its messages. To simplify the distribution over clock domain boundaries, the 64-bit timestamp is encoded in 7 bits, then decoded in the destination power domain. The timestamp distribution is shown in Figure 1021.

Whenever the frequency of TSGEN or Cortex-M33 changes, the ETM of the Cortex-M33 processor receives a pulse on TSCLKCHANGE input.

Figure 1021. CoreSight timestamp distribution

Block diagram of CoreSight timestamp distribution showing the flow from the Debug APB to the TSGEN, then through an encoder and replicator to various domains (STM, Cortex-A35, Cortex-M33) via decoders and interpolators.

The diagram illustrates the CoreSight timestamp distribution architecture. It starts with the Debug APB providing input to the Timestamp generator, which contains a Counter [63:0]. The 64-bit output from the counter goes to a Timestamp Encoder, which produces a 10-bit output. This 10-bit signal enters a Timestamp replicator. The replicator has three outputs:

The diagram is divided into two main sections by dashed lines: the High-frequency CPU domain and the Cortex-M33 subsystem domain. The label MSv73114V2 is located in the bottom right corner of the diagram area.

Block diagram of CoreSight timestamp distribution showing the flow from the Debug APB to the TSGEN, then through an encoder and replicator to various domains (STM, Cortex-A35, Cortex-M33) via decoders and interpolators.

80.9.3 Cross trigger interface (CTI) and matrix (CTM)

The cross trigger interfaces (CTI) and cross trigger matrix (CTM) form together the CoreSight™ embedded cross trigger feature. There are four CTI components, two in the debug subsystem, one for Cortex-A35 and one dedicated to the Cortex-M33.

The CTIs are connected to each other via a CTM. The debug subsystem CTIs and the Cortex-A35 CTI are accessible to the debugger via the debug APB. The Cortex-M33 CTI is accessible on its private peripheral bus (PPB) via the Cortex-M33 AHB access port.

Figure 1022. Embedded cross trigger

Block diagram of the Embedded cross trigger system showing connections between Cortex-A35_0 CTI, Debug subsystem CTI_0, Debug subsystem CTI_1, Cortex-M33 CTI, and various peripherals via CTM channels [3:0]

The diagram shows the Embedded cross trigger architecture consisting of four main Cross Trigger Interfaces (CTIs) interconnected by CTM channels [3:0]:

Block diagram of the Embedded cross trigger system showing connections between Cortex-A35_0 CTI, Debug subsystem CTI_0, Debug subsystem CTI_1, Cortex-M33 CTI, and various peripherals via CTM channels [3:0]

MSv73111V2

The CTIs allow events from various sources to trigger debug and/or trace activity. For example, a breakpoint reached in one of the processor cores can stop the other processors, or a transition detected on an external trigger input can start code trace.

Each CTI has up to eight trigger inputs and eight trigger outputs. Any input can be connected to any output, on the same CTI, or on another CTI via the CTM. The trigger input and output signals for each CTI are listed in tables below.

Table 909. Trace subsystem CTI_0 inputs
-Source signalSource componentComments
0ETRFULLETRETR full flag. Allows a debug event to be generated when the trace buffer is full.
1ETRACQCOMPETRETR capture finished. Allows a debug event to be generated when trace acquisition is complete.
2ETFFULLETFETF full flag. Allows a debug event to be generated when the trace FIFO is full.
3ETFACQCOMPETFETF capture finished. Allows a debug event to be generated when the trace FIFO is empty.
4TRIGOUTSPTESTMThe STM asserts this signal for one clock cycle when a trigger event is detected on a match using STMSPTER.
5TRIGOUTSWSTMThe STM asserts this signal for one clock cycle when a trigger event is generated on writes to a TRIG location in the extended stimulus port registers.
6TRIGOUTHETESTMThe STM asserts this signal for one clock cycle when a trigger event is detected on a match using STMHETER.
7ASYNCOUTSTMAlignment synchronization signal. The STM asserts this signal for one clock cycle when an ASYNC-VERSION-FREQ sequence is output on the ATB interface, and the ASYNCOUT signal can be used for cross-triggering.
Table 910. Trace subsystem CTI_0 outputs
-Output signalDestination componentComments
0ETRFLUSHETRETR flush trigger. Causes trace sources to be flushed into destination memory.
1ETRTRIGETRETR trigger. Causes various kinds of flush, stops the TMC, and causes additional trigger insertion.
2ETFFLUSHETFETF flush trigger. Causes trace FIFO to be flushed.
3ETFTRIGETFETF enable trigger. Starts filling the trace FIFO.
4TPIUFLUSHTPIUTrace port flush trigger. Causes TPIU FIFO to be flushed.
5TPIUTRIGTPIUTrace port enable trigger. Starts trace output on the external trace port.
6--Not used
7--Not used
Table 911. Trace subsystem CTI_1 inputs
-Source signalSource componentComments
0DBTRGIGPIOExternal trigger input. Allows an external signal to generate a debug event
1--Not used
2--Not used
3--Not used
4--Not used
5--Not used
6--Not used
7--Not used
Table 912. Trace subsystem CTI_1 outputs
-Output signalDestination componentComments
0DBTRGOGPIOExternal I/O trigger output. Allows monitoring of events on external DBTRGO pin.
1HWEVENTASTMSTM hardware event
2HWEVENTBSTMSTM hardware event
3HLTDBG_reqTSGENHalt timestamp in debug. Freezes TSGEN timestamp counter.
4HLTDBG_restartTSGENHalt timestamp in debug. Unfreezes TSGEN timestamp counter.
5--Not used
6--Not used
7--Not used
Table 913. Cortex-A35_0 CTI inputs
-Source signalSource componentComments
0DBGTRIGGERCortex-A35 CPUPulsed high when the core enters in debug state
1PMUIRQPMUPerformance monitor interrupt with inverted polarity
2--Not used
3--Not used
4EXTOUT0ETMETM external trigger output
5EXTOUT1ETMETM external trigger output
6EXTOUT2ETMETM external trigger output
7EXTOUT3ETMETM external trigger output
Table 914. Cortex-A35_0 CTI outputs
-Output signalDestination componentComments
0EDBGRQCortex-A35 CPUCPU halt request. Puts the CPU in debug mode.
1DBGRESTARTCortex-A35 CPUCPU restart request. The CPU exits debug mode.
2CTIIRQGICCTI interrupt
3--Not used
4EXTIN0ETMETM external input
5EXTIN1ETMETM external input
6EXTIN2ETMETM external input
7EXTIN3ETMETM external input
Table 915. Cortex-M33 CTI inputs
-Source signalSource componentComments
0HALTEDCortex-M33 CPUPulsed high when the core enters in debug state
1DWTCOMP_0Cortex-M33 DWTDWT comparator output
2DWTCOMP_1Cortex-M33 DWTDWT comparator output
3DWTCOMP_2Cortex-M33 DWTDWT comparator output
4ETMEVENTO_0Cortex-M33 ETMETM event output
5ETMEVENTO_0Cortex-M33 ETMETM event output
6--Not used
7--Not used
Table 916. Cortex-M33 CTI outputs
-Source signalDestination componentComments
0EDBGRQCortex-M33 CPUCPU halt request. Puts the CPU in debug mode.
1DBGRESTARTCortex-M33 CPUCPU restart request. The CPU exits debug mode.
2IRQ0Cortex-M33 NVICCTI interrupt
3IRQ1Cortex-M33 NVICCTI interrupt
4ETMEVENTIN_0Cortex-M33 ETMETM event input
5ETMEVENTIN_1Cortex-M33 ETMETM event input
6ETMEVENTIN_2Cortex-M33 ETMETM event input
7ETMEVENTIN_3Cortex-M33 ETMETM event input

There are four event channels in a cross trigger matrix, which allows up to four, parallel, bidirectional connections between trigger inputs and outputs on different CTIs.

To connect input number m on CTIx to output number n on CTIy, the input must be connected to an event channel p using the CTIINENm register of CTIx. The same channel p must be connected to the output using the CTIOUTENn register of CTIy.

Note: This applies even if the input and the output belong to the same CTI.

An input can be connected to more than one channel (up to four). An input can then be routed to several outputs. Similarly, an output can be connected to several inputs. Several inputs/outputs can also be connected to the same channel.

Figure 1023. Mapping trigger inputs to outputs

Diagram of mapping trigger inputs to outputs (Figure 1023)

The diagram shows three connected blocks: CTI x on the left with register CTIINENm = p receiving Input m, connecting to Channel p among Channels p, q, r, s of the central CTM block. On the right, CTI y with register CTIOUTENn = p connects Channel p to Output n. Source code: MSv66593V2.

Diagram of mapping trigger inputs to outputs (Figure 1023)

Example configuration: When either the MCU or the MPU hits a breakpoint, stop the other processor and restart the two processors synchronously.

To stop both cores, when either core stops requires the debug status output of each core (HALTED for Cortex-M33, DBGTRIGGER for Cortex-A35) to be connected to the EDBGRQ input of the opposite core.

As mentioned in Table 913 and Table 915, the DBGTRIGGER signal from Cortex-A35_0 processor core0 is connected to input 0 of the Cortex-A35_0 CTI. The same signal from the Cortex-M33 core is connected to the same input on the Cortex-M33 CTI. The programming of the CTIIEN0 register on each CTI connects these inputs to a CTM channel (for example channel 0).

As mentioned in Table 914 and Table 916, the EDBGRQ signals to the CPUs are connected to output 0 of their respective CTIs. The programming of the CTIIEN0 register on each CTI connects these outputs to the same CTM channel.

To restart both cores simultaneously the debugger must use the APPPULSE register in either of the CTIs. This allows the debugger to generate a pulse on any of the four CTM channels. The channel must be connected to the DBGRESTART signal of both cores.

As mentioned in Table 914 and Table 916, the DBGRESTART signals to the CPUs are connected to output 1 of their respective CTIs. The programming of the CTIOUTEN1 register on each CTI connects these outputs to another CTM channel (for example, channel 1).

The above configuration is illustrated in the figure below.

Figure 1024. Cross trigger configuration example

Figure 1024: Cross trigger configuration example. The diagram illustrates cross-trigger connections between Cortex-M33, CTI M33, CTM (Channel 0 and Channel 1), CTI C-A35_0, and Cortex-A35_0.

MSv66592V3

Figure 1024: Cross trigger configuration example. The diagram illustrates cross-trigger connections between Cortex-M33, CTI M33, CTM (Channel 0 and Channel 1), CTI C-A35_0, and Cortex-A35_0.

To force the processors to restart simultaneously, the debugger must use the following procedure:

  1. 1. Clear debug request by writing 0x01, then 0x00, to CTIINTACK register in each CTI.
  2. 2. Cause a pulse on channel 1 by writing 0x02 to APPPULSE register in either CTI.
    This generates a restart request to both processors.

Note: The debugger can also force both cores to stop simultaneously by writing 0x01 to the APPPULSE register in either CTI, which generates a pulse on channel 0.

Cross trigger interface registers

The register base address for each CTI is defined by the ROM table for the bus to which it is connected. The registers are the same for each CTI.

For more information on the CTI CoreSight component, refer to the Arm CoreSight SoC-400 technical reference manual [2].

80.9.4 Trace funnel (CSTF)

The trace funnel is a CoreSight component that combines the ATB buses from the five trace sources into one single ATB. The CSTF has five ATB slave ports, and one ATB master port. An arbiter selects the slave ports according to a programmable priority.

The slave ports are connected as follows:

The CSTF registers allow the slave ports to be individually enabled, and their priority settings to be configured. The priorities can be modified only when trace is disabled.

The arbitration works as follows:

  1. 1. The arbiter selects the slave port with the highest assigned priority that has data valid.
  2. 2. Up to min_hold_time transfers are passed from the selected slave to the master port, where min_hold_time is programmable in the CONTROL register.
  3. 3. A new arbitration is then performed.

A high priority must be assigned to slave ports connected to sources with a small amount of buffering, or where data loss cannot be tolerated. Low priority must be assigned to less critical sources or those with large buffers.

For more information on the CSTF CoreSight component, refer to the Arm CoreSight SoC-400 technical reference manual [2].

80.9.5 Embedded trace FIFO (ETF)

The ETF is a 64-Kbyte memory which captures trace data from five trace sources:

The ETF is a configuration of the CoreSight trace memory controller component. It can be used in the following modes (selected in the mode register):

The trace memory is used as a FIFO that is drained through the ATB master interface. Trace data is captured into the trace RAM and when full, the incoming trace stream is stalled. When the trace buffer is not empty, trace data is drained out through the ATB master interface to the TPIU.

In this mode, the role of the FIFO is to smooth the flow of trace information arriving at the trace port. Since the trace data can be very bursty in nature, the peak data rate can easily exceed the port capability, resulting in an overflow. The ETF allows a steady data rate at the trace port, which can then be sized according to the average rate rather than the peak. The trace is stored off-chip in real time by the trace port analyzer tool, and so the trace log can be very big.

The trace memory is used as a FIFO that can be read through the RRD register while trace is being captured. Trace data is captured into the trace RAM and when full, the incoming trace stream is stalled.

This mode allows the trace to be transferred by DMA into the system memory, or to a high-speed interface (such as SPI, USB), or even monitored by software running on one of the cores.

Note: Unlike the hardware FIFO mode, this mode is invasive, since it uses system resources which are shared by the processors.

The trace memory is used as a circular buffer. Trace data is captured into the trace memory starting from the location pointed to by the write pointer register. Even when the trace memory is full, incoming trace data continues to be overwritten into the trace memory until a stop condition occurs.

In this mode, the ETF stores the trace data on-chip, so the trace log size is limited to the ETF SRAM one (64 Kbytes in this case). Being a circular buffer, if the FIFO becomes full, incoming trace data overwrites the oldest stored data, which are lost. Therefore the contents of the trace buffer represent the most recent activity of the processor(s), up to the point when the buffer was stopped, rather than all the activity since the trace was started.

The possible methods to read out the buffer contents once the trace has stopped are details below:

For more information on the trace memory controller CoreSight component, refer to the Arm CoreSight Trace Memory Controller technical reference manual [3].

80.9.6 Embedded trace router (ETR)

The ETR allows trace data from the Arm trace bus to be sent to external memory, using a DMA scatter/gather interface over an AXI bus.

The ETR also supports programmable burst options for an optimum efficiency of the system interconnect and memory controller. The trace capture can be intrusive to system performance, because less memory is available to the rest of the system, and because the bandwidth must be shared between the ETR and regular system functions. However, the depth of trace capture available is likely to be much larger than available when storing in the

ETF and a trace port is not required. Reading of the AXI based trace buffer can either be done directly over the AXI from a normal bus master or through the ETR as if it is an ETB.

The ETR is a configuration of the CoreSight trace memory controller component. It is configured at design time, and some registers accessible through the APB interface allows some parameters to be modified. In particular, the following:

A low-power interface is implemented in order to allow the debugger to reset the ETR without provoking protocol violation on the global AXI bus interconnect. The LPI interface is controlled from a configuration register located in the Cortex-A35 system configuration.

From a security perspective, the ETR is associated with a RIMU that controls its master access to the interconnect (see Section 8: Resource isolation framework security controller (RIFSC) for more details on the RIMU).

80.9.7 Trace port interface unit (TPIU)

The TPIU is a CoreSight component that formats the trace stream and outputs it on the external trace port signals. The TPIU has a single ATB slave port for incoming trace data. The trace port is a synchronous parallel port, comprising a clock output, TRACECLK, and sixteen data outputs, TRACED(15:0). The trace port width is programmable in the range 1 to 16. Using a smaller port width reduces the number of test points/connector pins needed, and frees up I/Os for other purposes. It also restricts the bandwidth of the trace port and the quantity of trace information that can be output in real time.

For more information on TPIU CoreSight component, refer to the Arm CoreSight SoC-400 technical reference manual [2].

80.9.8 Replicator

This Arm CoreSight component replicates an Arm trace bus input to two identical Arm trace bus outputs. The replicator does not accept more data from the trace source until all trace sinks have accepted this data. This reduces the throughput of the replicator to match that of the slowest trace sink. To prevent this, the APB interface is implemented on this replicator, in order to disable paths. This gives also some filtering capabilities (for example some trace off-chip, some to the ETR).

Table 917. Replicator allocation

ATB output portTrace sink
#0ETR
#1TPIU

80.9.9 Serial-wire output (SWO)

The SWO is a CoreSight component that formats the trace stream from the Cortex-M33 processor ITM, and outputs it on the single wire TRACESWO output.

Compared to the TPIU, the SWO contains:

The SWO output supports Manchester encoded and UART NRZ formats.

For more information about the SWO CoreSight component, refer to the Arm CoreSight Components technical reference manual [4].

80.9.10 System trace macrocell (STM)

The system trace macrocell is a CoreSight component which allows instrumentation data generated by software to be incorporated in the trace output. The software writes the instrumentation data to the STM via a memory-mapped port on the AXI system interconnect. The data is formatted and time-stamped for output on the ATB trace bus, where it is merged with the trace coming from other sources (ETM, ITM).

Figure 1025. System trace macrocell

Block diagram of the System Trace Macrocell (STM) showing inputs and internal components.

The diagram illustrates the System Trace Macrocell (STM) architecture. It is a rectangular block containing several internal components and external interfaces. On the left, five inputs are shown: 'Hardware events', 'AXI', 'Timestamps', 'APB', and 'Authentication'. 'Hardware events' and 'AXI' feed into an 'Arbiter' block. The 'Arbiter' output goes to a 'Packet generation' block. 'Timestamps' also feed into the 'Packet generation' block. Below the 'Arbiter' and 'Packet generation' blocks is a 'Registers' block, which is connected to the 'APB' input. The output of the 'Packet generation' block goes to a 'FIFO' block. The 'FIFO' output leads to the 'ATB' output on the right. In the bottom right corner of the block, the text 'MSv67402V2' is present.

Block diagram of the System Trace Macrocell (STM) showing inputs and internal components.

The STM is configured with the following values:

The various AXI masters can generate trace by writing to the extended STM stimulus ports via its AXI slave port, which is mapped in a 4-Mbyte window of address space

(see Section 2.4: Memory organization). A 256-byte extended stimulus port comprises 16 x 64-bit locations or registers. Writes to different locations generate different types of trace packets, as shown in the table below.

The base address for stimulus port n is the STM base address + n x 256. A master can use any number of the 16384 available stimulus ports mapped in the 4-Mbyte window.

Table 918. STM extended stimulus port memory map

Address offsetNameDescription
0x00G_DMTSData, marked with timestamp, guaranteed
0x08G_DMData, marked, guaranteed
0x10G_DTSData, with timestamp, guaranteed
0x18G_DData, guaranteed
0x20-0x58-Reserved
0x60G_FLAGTSFlag with timestamp, guaranteed
0x68G_FLAGFlag, guaranteed
0x70G_TRIGTSTrigger with timestamp, guaranteed
0x78G_TRIGTrigger, guaranteed
0x80I_DMTSData, marked with timestamp, invariant timing
0x88I_DMData, marked, invariant timing
0x90I_DTSData, with timestamp, invariant timing
0x98I_DData, invariant timing
0xA0-0xD8-Reserved
0xE0I_FLAGTSFlag with timestamp, invariant timing
0xE8I_FLAGFlag, invariant timing
0xF0I_TRIGTSTrigger with timestamp, invariant timing
0xF8I_TRIGTrigger, invariant timing

The trace packets contain the 8-bit identity of the master that triggered them. This identity is decoded from the nonsecure master ID carried on the AWID wires of the AXI interconnect. The ID also includes the security status of the master at the time.

The ID is mapped as follows:

A list of valid IDs and how they map to the originating master is given in the table below.

Table 919. STM trace packet ID mapping to AXI masters

MasterSecure access IDNonsecure access ID
Cortex-A35 processor core00x000x40
Cortex-M330x020x42
Table 919. STM trace packet ID mapping to AXI masters (continued)
MasterSecure access IDNonsecure access ID
HPDMA10x030x43
HPDMA20x040x44
HPDMA30x050x45
DAP-AXI-AP0x060x46

The STM can also generate trace packets or triggers when certain hardware events are detected. A maximum of 64 events can be traced at any one time. An external multiplexer allows four sets of signals to be mapped onto these events. The mapping is given in Table 920 to Table 922. All events are edge sensitive.

As shown in Table 900, the STM is subject to the authentication signals for Cortex-A35 and Cortex-M33. This means that only a processor that has the rights to produce trace (established from BSEC_DENR) can use the STM.

For more information on the STM, refer to the Arm CoreSight STM technical reference manual [8].

Table 920. Hardware event mapping 0 to 3
BankEventEXTMUX(7:0) = 0EXTMUX(7:0) = 1EXTMUX(7:0) = 2EXTMUX(7:0) = 3
HEBS = 00HPDMA1_ch0_cpu1_irqHPDMA2_ch0_cpu1_irqHPDMA3_ch0_cpu1_irq-
1HPDMA1_ch1_cpu1_irqHPDMA2_ch1_cpu1_irqHPDMA3_ch1_cpu1_irq-
2HPDMA1_ch2_cpu1_irqHPDMA2_ch2_cpu1_irqHPDMA3_ch2_cpu1_irq-
3HPDMA1_ch3_cpu1_irqHPDMA2_ch3_cpu1_irqHPDMA3_ch3_cpu1_irq-
4HPDMA1_ch4_cpu1_irqHPDMA2_ch4_cpu1_irqHPDMA3_ch4_cpu1_irq-
5HPDMA1_ch5_cpu1_irqHPDMA2_ch5_cpu1_irqHPDMA3_ch5_cpu1_irq-
6HPDMA1_ch6_cpu1_irqHPDMA2_ch6_cpu1_irqHPDMA3_ch6_cpu1_irq-
7HPDMA1_ch7_cpu1_irqHPDMA2_ch7_cpu1_irqHPDMA3_ch7_cpu1_irq-
8HPDMA1_ch8_cpu1_irqHPDMA2_ch8_cpu1_irqHPDMA3_ch8_cpu1_irq-
9HPDMA1_ch9_cpu1_irqHPDMA2_ch9_cpu1_irqHPDMA3_ch9_cpu1_irq-
10HPDMA1_ch10_cpu1_irqHPDMA2_ch10_cpu1_irqHPDMA3_ch10_cpu1_irq-
11HPDMA1_ch11_cpu1_irqHPDMA2_ch11_cpu1_irqHPDMA3_ch11_cpu1_irq-
12HPDMA1_ch12_cpu1_irqHPDMA2_ch12_cpu1_irqHPDMA3_ch12_cpu1_irq-
13HPDMA1_ch13_cpu1_irqHPDMA2_ch13_cpu1_irqHPDMA3_ch13_cpu1_irqLPTIMER1_IT_irq
14HPDMA1_ch14_cpu1_irqHPDMA2_ch14_cpu1_irqHPDMA3_ch14_cpu1_irqLPTIMER2_IT_irq

Table 920. Hardware event mapping 0 to 3 (continued)

BankEventEXTMUX(7:0) = 0EXTMUX(7:0) = 1EXTMUX(7:0) = 2EXTMUX(7:0) = 3
HEBS = 015HPDMA1_ch15_cpu1_irqHPDMA2_ch15_cpu1_irqHPDMA3_ch15_cpu1_irqLPTIMER3_IT_irq
16HPDMA1_ch0_cpu2_irqHPDMA2_ch0_cpu2_irqHPDMA3_ch0_cpu2_irqLPTIMER4_IT_irq
17HPDMA1_ch1_cpu2_irqHPDMA2_ch1_cpu2_irqHPDMA3_ch1_cpu2_irqLPTIMER5_IT_irq
18HPDMA1_ch2_cpu2_irqHPDMA2_ch2_cpu2_irqHPDMA3_ch2_cpu2_irq-
19HPDMA1_ch3_cpu2_irqHPDMA2_ch3_cpu2_irqHPDMA3_ch3_cpu2_irqSPI1_irq
20HPDMA1_ch4_cpu2_irqHPDMA2_ch4_cpu2_irqHPDMA3_ch4_cpu2_irqSPI2_irq
21HPDMA1_ch5_cpu2_irqHPDMA2_ch5_cpu2_irqHPDMA3_ch5_cpu2_irqSPI3_irq
22HPDMA1_ch6_cpu2_irqHPDMA2_ch6_cpu2_irqHPDMA3_ch6_cpu2_irqSPI4_irq
23HPDMA1_ch7_cpu2_irqHPDMA2_ch7_cpu2_irqHPDMA3_ch7_cpu2_irqSPI5_irq
24HPDMA1_ch8_cpu2_irqHPDMA2_ch8_cpu2_irqHPDMA3_ch8_cpu2_irqSPI6_irq
25HPDMA1_ch9_cpu2_irqHPDMA2_ch9_cpu2_irqHPDMA3_ch9_cpu2_irqSPI7_irq
26HPDMA1_ch10_cpu2_irqHPDMA2_ch10_cpu2_irqHPDMA3_ch10_cpu2_irq-
27HPDMA1_ch11_cpu2_irqHPDMA2_ch11_cpu2_irqHPDMA3_ch11_cpu2_irq-
28HPDMA1_ch12_cpu2_irqHPDMA2_ch12_cpu2_irqHPDMA3_ch12_cpu2_irqSAI1_irq
29HPDMA1_ch13_cpu2_irqHPDMA2_ch13_cpu2_irqHPDMA3_ch13_cpu2_irqSAI2_irq
30HPDMA1_ch14_cpu2_irqHPDMA2_ch14_cpu2_irqHPDMA3_ch14_cpu2_irqSAI3_irq
31HPDMA1_ch15_cpu2_irqHPDMA2_ch15_cpu2_irqHPDMA3_ch15_cpu2_irqSAI4_irq
HEBS = 10EXTI2_EXTI0_irqPWRCTL_wkup1_irqTIM1_brk_irqI2C1_glb_irq
1EXTI2_EXTI1_irqPWRCTL_wkup2_irqTIM1_cc_irqI2C2_glb_irq
2EXTI2_EXTI2_irqPWRCTL_wkup3_irqTIM1_trg_irqI2C3_glb_irq
3EXTI2_EXTI3_irqPWRCTL_wkup4_irqTIM1_upd_irq-
4EXTI2_EXTI4_irqPWRCTL_wkup5_irqTIM2_irq-
5EXTI2_EXTI5_irqPWRCTL_wkup6_irqTIM3_irq-
6EXTI2_EXTI6_irq-TIM4_irq-
7EXTI2_EXTI7_irqADC1_irqTIM5_gbl_irq-
8EXTI2_EXTI8_irqADC2_irqTIM6_gbl_irqI3C1_glb_irq
9EXTI2_EXTI9_irq-TIM7_gbl_irqI3C2_glb_irq
10EXTI2_EXTI10_irq-TIM8_brk_irqI3C3_glb_irq
11EXTI2_EXTI11_irqFMC_glb_irqTIM8_cc_irq-
12EXTI2_EXTI12_irqOTFDEC1_irqTIM8_trg_irq-
13EXTI2_EXTI13_irq-TIM8_upd_irqSPDIF_RX_irq
14EXTI2_EXTI14_irq-TIM10_gbl_irqSDMMC1_irq
15EXTI2_EXTI15_irqOCTOSPI1_irqTIM11_gbl_irqSDMMC2_irq
16EXTI1_EXTI0_irq-TIM12_gbl_irqSDMMC3_irq

Table 920. Hardware event mapping 0 to 3 (continued)

BankEventEXTMUX(7:0) = 0EXTMUX(7:0) = 1EXTMUX(7:0) = 2EXTMUX(7:0) = 3
HEBS = 117EXTI1_EXTI1_irqFDCAN_cal_irqTIM13_gbl_irq-
18EXTI1_EXTI2_irqFDCAN1_intr0_irqTIM14_gbl_irq-
19EXTI1_EXTI3_irqFDCAN1_intr1_irqTIM15_gbl_irq-
20EXTI1_EXTI4_irqFDCAN2_intr0_irqTIM16_gbl_irq-
21EXTI1_EXTI5_irqFDCAN2_intr1_irqTIM17_gbl_irq-
22EXTI1_EXTI6_irqFDCAN3_intr0_irq--
23EXTI1_EXTI7_irqFDCAN3_intr1_irq--
24EXTI1_EXTI8_irq--EXTI_wwdg1_wkup
25EXTI1_EXTI9_irqFPU_irq-IWDG1_ew_irq
26EXTI1_EXTI10_irq--IWDG2_ew_irq
27EXTI1_EXTI11_irq--IWDG3_ew_irq
28EXTI1_EXTI12_irqLTDC_cpu1_I01_irq-IWDG4_ew_irq
29EXTI1_EXTI13_irqLTDC_cpu1_I01_err_irq--
30EXTI1_EXTI14_irqLTDC_cpu1_I2_irq-WWDG1_ew_irq
31EXTI1_EXTI15_irqLTDC_cpu1_I2_err_irq--

Table 921. Hardware event mapping 4 to 7

BankEventEXTMUX(7:0) = 4EXTMUX(7:0) = 5EXTMUX(7:0) = 6EXTMUX(7:0) = 7
HEBS = 00HWEVENTA -LTDC_cpu2_I01_irqMDF1_FLT0_irqUSART1_irq
1HWEVENTA -LTDC_cpu2_I01_err_irqMDF1_FLT1_irqUSART2_irq
2HWEVENTB -LTDC_cpu2_I2_irqMDF1_FLT2_irqUSART3_irq
3HWEVENTB -LTDC_cpu2_I2_err_irqMDF1_FLT3_irqUART4_irq
4--MDF1_FLT4_irqUART5_irq
5cpu2_sysreset_irqDCMIPP_glb_irqMDF1_FLT5_irqUSART6_irq
6--MDF1_FLT6_irqUART7_irq
7--MDF1_FLT7_irq-
8TEMP_irq---
9RETRAMcrc_err_irqCSIhost_irq-LPUART1_irq
10-CCI_irqIPCC1_rx0_cpu1_irq-
11CRYP1_irq-IPCC1_rx0_cpu1_s_irqUSART1_RX_sreq
12CRYP2_irqETH1_lpi_irqIPCC1_tx0_cpu1_irqUSART1_TX_sreq
13SAES_irqETH1_pmt_irqIPCC1_tx0_cpu1_s_irqUSART2_RX_sreq
14HASH_irqETH1_sbd_irq-USART2_TX_sreq

Table 921. Hardware event mapping 4 to 7 (continued)

BankEventEXTMUX(7:0) = 4EXTMUX(7:0) = 5EXTMUX(7:0) = 6EXTMUX(7:0) = 7
HEBS = 015PKA_irqETH2_lpi_irq-USART3_RX_sreq
16RNG_irqETH2_pmt_irq-USART3_TX_sreq
17TAMP_cpu1_s_wkupETH2_sbd_irq-UART4_RX_sreq
18TAMP_cpu1_wkup-IPCC1_rx1_cpu2_irqUART4_TX_sreq
19TAMP_cpu2_s_wkupETHSW_fsc_irqIPCC1_rx1_cpu2_s_irqUART5_RX_sreq
20TAMP_cpu2_wkupETHSW_msg_buf_irqIPCC1_tx1_cpu2_irqUART5_TX_sreq
21-ETHSW_combined_irqIPCC1_tx1_cpu2_s_irqUSART6_RX_sreq
22---USART6_TX_sreq
23IAC_cpu1_irq--UART7_RX_sreq
24IAC_cpu2_irq--UART7_TX_sreq
25----
26RTC_cpu1_wkuprcc_hsifmon_cpu1_irq--
27RTC_cpu1_s_wkuprcc_hsifmon_cpu2_irq--
28RTC_cpu2_wkup-ddrphy_irq-
29RTC_cpu2_s_wkupTIM8_CH1_sreqddrperfm_irqLPUART1_RX_sreq
30-TIM8_CH2_srequmctl2_irqLPUART1_TX_sreq
31----
HEBS = 10TIM1_CH1_sreqTIM8_CH3_sreqdfi_error_irqSPI1_RX_sreq
1TIM1_CH2_sreqTIM8_CH4_sreqSERF_irqSPI1_TX_sreq
2TIM1_CH3_sreqTIM8_UP_sreq-SPI2_RX_sreq
3TIM1_CH4_sreqTIM8_TRIG_sreqI2C1_EVC_sreqSPI2_TX_sreq
4TIM1_TRIG_sreqTIM8_COM_sreqI2C2_EVC_sreqSPI3_RX_sreq
5TIM1_UP_sreqTIM15_CH1_sreqI2C3_EVC_sreqSPI3_TX_sreq
6TIM1_COM_sreqTIM15_UP_sreq-SPI4_RX_sreq
7TIM2_CH1_sreqTIM15_TRIG_sreq-SPI4_TX_sreq
8TIM2_CH2_sreqTIM15_COM_sreq-SPI5_RX_sreq
9TIM2_CH3_sreqTIM16_CH1_sreq-SPI5_TX_sreq
10TIM2_CH4_sreqTIM16_UP_sreq-SPI6_RX_sreq
11TIM2_UP_sreqTIM17_CH1_sreqI2C1_RX_sreqSPI6_TX_sreq
12TIM3_CH1_sreqTIM17_UP_sreqI2C1_TX_sreqSPI7_RX_sreq
13TIM3_CH2_sreq-I2C2_RX_sreqSPI7_TX_sreq
14TIM3_CH3_sreq-I2C2_TX_sreq-
15TIM3_CH4_sreq-I2C3_RX_sreq-
16TIM3_UP_sreq-I2C3_TX_sreq-

Table 921. Hardware event mapping 4 to 7 (continued)

BankEventEXTMUX(7:0) = 4EXTMUX(7:0) = 5EXTMUX(7:0) = 6EXTMUX(7:0) = 7
HEBS = 117TIM3_TRIG_sreq--SAI1_A_sreq
18TIM4_CH1_sreq--SAI1_B_sreq
19TIM4_CH2_sreq--SAI2_A_sreq
20TIM4_CH3_sreqLPTIMER1_IC1_sreq-SAI2_B_sreq
21TIM4_CH4_sreqLPTIMER1_IC2_sreq-SAI3_A_sreq
22TIM4_UP_sreqLPTIMER1_UE_sreq-SAI3_B_sreq
23TIM5_CH1_sreqLPTIMER2_IC1_sreq-SAI4_A_sreq
24TIM5_CH2_sreqLPTIMER2_IC2_sreq-SAI4_B_sreq
25TIM5_CH3_sreqLPTIMER2_UE_sreq--
26TIM5_CH4_sreqLPTIMER3_IC1_sreq-DCMI_sreq
27TIM5_UP_sreqLPTIMER3_UE_sreq--
28TIM5_TRIG_sreqLPTIMER4_IC1_sreqADC1_sreq-
29TIM6_UP_sreqLPTIMER4_UE_sreqADC2_sreq-
30TIM7_UP_sreqLPTIMER5_IC1_sreq--
31-LPTIMER5_UE_sreq--

Key: sreq = DMA request; irq = interrupt request; - = active going; \(\bar{\phantom{x}}\) = inactive going

Table 922. Hardware event mapping 8 to 9

BankEventEXTMUX(7:0) = 8EXTMUX(7:0) = 9
HEBS = 00FMC_TXRX_sreqEXTI_iwdg1_wkup
1FMC_BCH_sreqEXTI_iwdg2_wkup
2-EXTI_iwdg3_wkup
3OCTOSPI1_sreqEXTI_iwdg4_wkup
4--
5SPDIF_RX_DT_sreqEXTI_pwr_pvd_wkup
6SPDIF_RX_CS_sreqEXTI_cpu1_sev_irq
7-EXTI_cpu2_sev_irq
8MDF1_FLT0_sreq-
9MDF1_FLT1_sreq-
10MDF1_FLT2_sreqRCC_cpu1_wkup_irq
11MDF1_FLT3_sreqRCC_cpu2_wkup_irq
12MDF1_FLT4_sreqRCC_cpu1_irq
13MDF1_FLT5_sreqRCC_cpu2_irq

Table 922. Hardware event mapping 8 to 9 (continued)

BankEventEXTMUX(7:0) = 8EXTMUX(7:0) = 9
HEBS = 014MDF1_FLT6_sreqRAMCFG_irq
15MDF1_FLT7_sreq-
16--
17--
18CRYP1_IN_sreq-
19CRYP1_OUT_sreq-
20CRYP2_IN_sreq-
21CRYP2_OUT_sreq-
22HASH2_IN_sreq-
23SAES_IN_sreq-
24SAES_OUT_sreq-
25--
26--
27USBH_ohci_irq-
28USBH_ehci_irq-
29--
30--
31--
HEBS = 10SYS_DS_EXITRNG2_irq
1CPU1_DS_EXITHASH2_irq
2CPU2_DS_EXITEXTI_usbh_cpu2_wkup
3PWRDS_CPU1otg_hs_glb_irq
4PWRDS_CPU2DENABLE_A35_error
5PWRDS_SYSDENABLE_M33_error
6C1_STBY_EXITDENABLE_DAP_error
7C2_STBY_EXIT-
8AWU_WAKE_CPU2_V33-
9AWU_WAKE_CPU1_V33-
10PWRWAKE_CPU1-
11PWRWAKE_CPU2-
12PWRWAKE_SYS-
13--

Table 922. Hardware event mapping 8 to 9 (continued)

BankEventEXTMUX(7:0) = 8EXTMUX(7:0) = 9
HEBS = 114cpu1_c0_standbywfi-
15--
16cpu1_standbywfi_l2-
17cpu2_sleeping-
18cpu2_sleepdeep-
19--
20--
21--
22exti_pwr_pvm_wkup-
23exti_usbh_wkup-
24exti_usb_otg_wkup-
25--
26--
27--
28--
29--
30--
31--

STM registers

The STM is configured and controlled by registers mapped on the debug APB accessible either from the debugger through JTAG or through the interconnect for self-hosted debug (see Section 2.4: Memory organization).

80.9.11 Microcontroller debug unit (DBGMCU)

The DBGMCU is a component containing a number of registers which control the power and clock behavior in debug mode. It allows the debugger or debug software for the following tasks:

Legacy DBGMCU features (dbg/trace_en, dbg_sleep/stop/stby, dbg_freeze) will be disabled when debug is closed. Only registers required for authentication procedure will be accessible.

Low-power mode emulation in debug

When entering a low-power mode, the clock to the processor, the system clock, or the core power supply (only in Standby), can be switched off. This prevents any debug accesses to the unclocked domains.

To simplify debugging of applications which use these power saving features, the clock and power can be maintained or not according to the setting of DBG_STANDBY, DBG_STOP, and DBG_SLEEP in DBGMCU_CR.

There are no restrictions from a security perspective to access these control bits as the overall system behavior is not modified, apart that the power and clocks remain on. The application software does not need to be modified.

If the system enters one of the power saving modes, and the corresponding register bit is set, the system state in the EXTI is not affected: the system enters and exits the low-power mode as usual. The clock and power remain active, allowing the debugger full access.

Note: If the TPIU is used, loss of trace data can occur if the system enters Standby and switches off the core power before the TPIU FIFO is empty. The software can check the FIFO state to avoid this. If DBG_STANDBY bit is set while using the trace port, the trace continues to flush during Standby, and no specific software action is required.

Peripheral clock “freeze” in debug

When one or more processors are halted in debug state, by default the peripherals continue to operate. The system state, at the moment the breakpoint was taken, is overwritten and cannot be recovered. Some peripherals require software intervention on a regular basis, without which they may time out and generate a reset (watchdogs for example).

By setting the corresponding bits in DBGMCU peripheral freeze registers, some peripheral clocks can be stopped automatically as soon as one or more processors enter debug state. The clocks remain stopped until the processor is restarted.

The following peripherals support this feature:

There is one CPU specific register for each peripheral to control whether the peripheral is sensitive to Cortex-A35 or Cortex-M33 debug states.

In STM32MP21xx, peripherals can be dedicated to one specific processor thanks to a RISU (resource isolation slave unit) for peripherals (see Section 8: Resource isolation framework security controller (RIFSC) for more details on the RISUP). DBGMCU register bits inherit from these RISUP. As a consequence, accesses to the register bits are filtered accordingly to the processor which has been associated to the peripheral.

The access to the registers depends also on the secure state of the processor as follows:

The status (secure or nonsecure) and the allocation of a peripheral or a DMA channel, are signaled to the DBGMCU by the peripheral. To ensure that these settings are always taken into account, the debugger can only access registers through the DAP AXI-AP. The access then goes through the device interconnect, and must satisfy the same rules as a processor with respect to secure and allocation schemes.

Cortex-M33 debug state corresponds to a high level on HALTED signal. The Cortex-A35 is an OR of the DBGACK signal from each core. If either Cortex-A35 processor core enters debug, and the corresponding bit in the peripheral freeze register is set, the peripheral clock is then frozen.

The IWDG1 (secure watchdog for Cortex-A35) is an exception to the above. When secure debugging is disabled (SPIDEN = 0), any Cortex-A35 processor core which is in secure state does not stop in debug mode until it exits secure state. For security reasons, when SPIDEN = 0, the IWDG1 does not stop unless both Cortex-A35 processor core DBGACK signals are active: both processor cores have stopped, and are then in nonsecure state.

The IWDG1 behavior is summarized in the table below.

Table 923. IWDG1 behavior in debug

InputsIWDG1 frozen?
IWDG1(1)SPIDENDEBUGACK (Cortex-A35 core0)
0XXNo
100No
101Yes
110No
111Yes
110No
111Yes

1. Bit in DBGMCU_APB3FZ1 register.

Processor debug unit registers

DBGMCU registers are not reset by a system reset, only by a power on reset. A few of them (DBGMCU_IDC and DBGMCU_CR) are accessible to the debugger via the debug APB bus at base address 0x8000 1000. The whole register set is accessible by processors and debugger (through DAP AXI-AP) at base address 0x5A0A 0000 (to the extent they satisfy the secure/allocation conditions as explained earlier).

DBGMCU identity code register (DBGMCU_IDC)

Address offset: 0x000

Reset value: 0xXXXX 6503

31302928272625242322212019181716
REV_ID[15:0]
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.DEV_ID[11:0]
rrrrrrrrrrrr
Bits 31:16 REV_ID[15:0] : Revision

Example 0x2000 = revision 2.0

Bits 15:12 Reserved, must be kept at reset value.

Bits 11:0 DEV_ID[11:0] : Device identifier

0x0503: STM32MP21X

DBGMCU configuration register (DBGMCU_CR)

Address offset: 0x004

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_S
TANDB
Y
DBG_S
TOP
DBG_S
LEEP
rwrwrs

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 DBG_STANDBY : Debug enable in Standby mode0: Normal operation. All clocks are disabled and \(V_{DDCORE}\) (and \(V_{DDCPU}\) if selected) domains are powered down automatically in Standby mode.1: Automatic clock stop/power down disabled. All active clocks and oscillators continue to run during Standby, and \(V_{DDCORE}\) as well as \(V_{DDCPU}\) domain supplies are maintained, allowing full debug capability. Note: On exit from Standby mode, a system reset is performed. Bit 1 DBG_STOP : Debug enable in Stop mode

0: Normal operation. All clocks are disabled automatically in Stop mode.

1: Automatic clock stop disabled. All active clocks and oscillators continue to run during Stop mode, allowing full debug capability.

Note: On exit from Stop mode, the clock settings are set to the Stop mode exit state.

Bit 0 DBG_SLEEP: Debug enable in Sleep mode

0: Normal operation. The processor clock is stopped automatically in Sleep mode.

1: Automatic clock stop disabled. The processor clock continues to run, allowing full debug capability.

DBGMCU configuration register CPU1 (DBGMCU_CRA35)

Address offset: 0x008

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_STGEN_STOPRes.
rw

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 DBG_STGEN_STOP: STGEN behavior when debug is enabled

This bit determines the behavior of the time generator used for the operating system timer in debug mode.

0: Normal operation. OS timer continues to run.

1: Freeze OS timer when Cortex-A35 processor core halts in debug mode.

Bit 0 Reserved, must be kept at reset value.

DBGMCU AHB2 - lowest part - peripheral freeze register CPU1 (DBGMCU_AHB2LFZ1)

Address offset: 0x010

Reset value: 0x0000 0000

31302928272625242322212019181716
DBG_H
PDMA2
_CH15
_STOP
DBG_H
PDMA2
_CH14
_STOP
DBG_H
PDMA2
_CH13
_STOP
DBG_H
PDMA2
_CH12
_STOP
DBG_H
PDMA2
_CH11
_STOP
DBG_H
PDMA2
_CH10
_STOP
DBG_H
PDMA2
_CH9
_STOP
DBG_H
PDMA2
_CH8
_STOP
DBG_H
PDMA2
_CH7
_STOP
DBG_H
PDMA2
_CH6
_STOP
DBG_H
PDMA2
_CH5
_STOP
DBG_H
PDMA2
_CH4
_STOP
DBG_H
PDMA2
_CH3
_STOP
DBG_H
PDMA2
_CH2
_STOP
DBG_H
PDMA2
_CH1
_STOP
DBG_H
PDMA2
_CH0
_STOP
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DBG_H
PDMA1
_CH15
_STOP
DBG_H
PDMA1
_CH14
_STOP
DBG_H
PDMA1
_CH13
_STOP
DBG_H
PDMA1
_CH12
_STOP
DBG_H
PDMA1
_CH11
_STOP
DBG_H
PDMA1
_CH10
_STOP
DBG_H
PDMA1
_CH9
_STOP
DBG_H
PDMA1
_CH8
_STOP
DBG_H
PDMA1
_CH7
_STOP
DBG_H
PDMA1
_CH6
_STOP
DBG_H
PDMA1
_CH5
_STOP
DBG_H
PDMA1
_CH4
_STOP
DBG_H
PDMA1
_CH3
_STOP
DBG_H
PDMA1
_CH2
_STOP
DBG_H
PDMA1
_CH1
_STOP
DBG_H
PDMA1
_CH0
_STOP
rwrwrwrwrwrwrwrsrwrwrwrwrwrwrwrs

Bits 31:16 DBG_HPDMA2_CHn_STOP: HPDMA2_CHn suspend in debug (n = 15 to 0)

0: Normal operation. HPDMA2_CHn continues to operate while Cortex-A35 is in debug mode.

1: Stop in debug. HPDMA2_CHn is suspended while Cortex-A35 is in debug mode.

Bits 15:0 DBG_HPDMA1_CHn_STOP: HPDMA1_CHn suspend in debug (n = 15 to 0)

DBGMCU AHB2 - highest part- peripheral freeze register CPU1
(DBGMCU_AHB2HFZ1)

Address offset: 0x014

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DBG_H
PDMA3
_CH15
_STOP
DBG_H
PDMA3
_CH14
_STOP
DBG_H
PDMA3
_CH13
_STOP
DBG_H
PDMA3
_CH12
_STOP
DBG_H
PDMA3
_CH11
_STOP
DBG_H
PDMA3
_CH10
_STOP
DBG_H
PDMA3
_CH9
_STOP
DBG_H
PDMA3
_CH8
_STOP
DBG_H
PDMA3
_CH7
_STOP
DBG_H
PDMA3
_CH6
_STOP
DBG_H
PDMA3
_CH5
_STOP
DBG_H
PDMA3
_CH4
_STOP
DBG_H
PDMA3
_CH3
_STOP
DBG_H
PDMA3
_CH2
_STOP
DBG_H
PDMA3
_CH1
_STOP
DBG_H
PDMA3
_CH0
_STOP
rwrwrwrwrwrwrwrsrwrwrwrwrwrwrwrs

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 DBG_HPDMA3_CHn_STOP: HPDMA3_CHn suspend in debug (n = 15 to 0)

DBGMCU AHB2 - lowest part - peripheral freeze register CPU2
(DBGMCU_AHB2LFZ2)

Address offset: 0x018

Reset value: 0x0000 0000

31302928272625242322212019181716
DBG_H
PDMA2
_CH15
_STOP
DBG_H
PDMA2
_CH14
_STOP
DBG_H
PDMA2
_CH13
_STOP
DBG_H
PDMA2
_CH12
_STOP
DBG_H
PDMA2
_CH11
_STOP
DBG_H
PDMA2
_CH10
_STOP
DBG_H
PDMA2
_CH9
_STOP
DBG_H
PDMA2
_CH8
_STOP
DBG_H
PDMA2
_CH7
_STOP
DBG_H
PDMA2
_CH6
_STOP
DBG_H
PDMA2
_CH5
_STOP
DBG_H
PDMA2
_CH4
_STOP
DBG_H
PDMA2
_CH3
_STOP
DBG_H
PDMA2
_CH2
_STOP
DBG_H
PDMA2
_CH1
_STOP
DBG_H
PDMA2
_CH0
_STOP
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DBG_H
PDMA1
_CH15
_STOP
DBG_H
PDMA1
_CH14
_STOP
DBG_H
PDMA1
_CH13
_STOP
DBG_H
PDMA1
_CH12
_STOP
DBG_H
PDMA1
_CH11
_STOP
DBG_H
PDMA1
_CH10
_STOP
DBG_H
PDMA1
_CH9
_STOP
DBG_H
PDMA1
_CH8
_STOP
DBG_H
PDMA1
_CH7
_STOP
DBG_H
PDMA1
_CH6
_STOP
DBG_H
PDMA1
_CH5
_STOP
DBG_H
PDMA1
_CH4
_STOP
DBG_H
PDMA1
_CH3
_STOP
DBG_H
PDMA1
_CH2
_STOP
DBG_H
PDMA1
_CH1
_STOP
DBG_H
PDMA1
_CH0
_STOP
rwrwrwrwrwrwrwrsrwrwrwrwrwrwrwrs

Bits 31:16 DBG_HPDMA2_CHn_STOP: HPDMA2_CHn suspend in debug (n = 15 to 0)

Bits 15:0 DBG_HPDMA1_CHn_STOP: HPDMA1_CHn suspend in debug (n = 15 to 0)

DBGMCU AHB2 - highest part- peripheral freeze register CPU2
(DBGMCU_AHB2HFZ2)

Address offset: 0x01C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DBG_H
PDMA3
_CH15
_STOP
DBG_H
PDMA3
_CH14
_STOP
DBG_H
PDMA3
_CH13
_STOP
DBG_H
PDMA3
_CH12
_STOP
DBG_H
PDMA3
_CH11
_STOP
DBG_H
PDMA3
_CH10
_STOP
DBG_H
PDMA3
_CH9
_STOP
DBG_H
PDMA3
_CH8
_STOP
DBG_H
PDMA3
_CH7
_STOP
DBG_H
PDMA3
_CH6
_STOP
DBG_H
PDMA3
_CH5
_STOP
DBG_H
PDMA3
_CH4
_STOP
DBG_H
PDMA3
_CH3
_STOP
DBG_H
PDMA3
_CH2
_STOP
DBG_H
PDMA3
_CH1
_STOP
DBG_H
PDMA3
_CH0
_STOP
rwrwrwrwrwrwrwrsrwrwrwrwrwrwrwrs

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 DBG_HPDMA3_CHn_STOP: HPDMA3_CHn suspend in debug (n = 15 to 0)

DBGMCU APB1 peripheral freeze register CPU1 (DBGMCU_APB1FZ1)

Address offset: 0x02C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.DBG_T
IM11_S
TOP
DBG_T
IM10_S
TOP
Res.DBG_I
3C2_S
TOP
DBG_I
3C1_S
TOP
DBG_I
2C2_S
TOP
DBG_I
2C1_S
TOP
Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.DBG_L
PTIM2_
STOP
DBG_L
PTIM1_
STOP
DBG_T
IM14_S
TOP
DBG_T
IM13_S
TOP
DBG_T
IM12_S
TOP
DBG_T
IM7_ST
OP
DBG_T
IM6_ST
OP
DBG_T
IM5_ST
OP
DBG_T
IM4_ST
OP
DBG_T
IM3_ST
OP
DBG_T
IM2_ST
OP
rwrwrsrwrwrwrwrwrwrwrs

Bits 31:30 Reserved, must be kept at reset value.

Bit 29 DBG_TIM11_STOP: TIM11 stop in debug

Bit 28 DBG_TIM10_STOP: TIM10 stop in debug

Bit 1 DBG_TIM3_STOP: TIM3 stop in debug

Bit 0 DBG_TIM2_STOP: TIM2 stop in debug

DBGMCU APB1 peripheral freeze register CPU2 (DBGMCU_APB1FZ2)

Address offset: 0x030

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.DBG_TIM11_STOPDBG_TIM10_STOPRes.DBG_I3C2_STOPDBG_I3C1_STOPDBG_I2C2_STOPDBG_I2C1_STOPRes.Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.DBG_LPTIM2_STOPDBG_LPTIM1_STOPDBG_TIM14_STOPDBG_TIM13_STOPDBG_TIM12_STOPDBG_TIM7_STOPDBG_TIM6_STOPDBG_TIM5_STOPDBG_TIM4_STOPDBG_TIM3_STOPDBG_TIM2_STOP
rwrwrsrwrwrwrwrwrwrwrs

Bits 31:30 Reserved, must be kept at reset value.

Bit 29 DBG_TIM11_STOP: TIM11 stop in debug

Bit 28 DBG_TIM10_STOP: TIM10 stop in debug

Bit 27 Reserved, must be kept at reset value.

Bit 26 DBG_I3C2_STOP: I3C2 SMBUS timeout stop in debug

Bit 25 DBG_I3C1_STOP: I3C1 SMBUS timeout stop in debug

Bit 24 DBG_I2C2_STOP: I2C2 SMBUS timeout stop in debug

Bit 23 DBG_I2C1_STOP: I2C1 SMBUS timeout stop in debug

Bits 22:11 Reserved, must be kept at reset value.

DBGMCU APB2 peripheral freeze register CPU1 (DBGMCU_APB2FZ1)

Address offset: 0x034

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.DBG_FDCAN_STOPRes.Res.Res.Res.Res.DBG_TIM17_STOPDBG_TIM16_STOPDBG_TIM15_STOPRes.Res.Res.DBG_TIM8_STOPDBG_TIM1_STOP
rwrwrwrwrwrs

Bits 31:14 Reserved, must be kept at reset value.

Bit 13 DBG_FDCAN_STOP: FDCAN stop in debug

Bits 12:8 Reserved, must be kept at reset value.

Bit 7 DBG_TIM17_STOP: TIM17 stop in debugBit 6 DBG_TIM16_STOP: TIM16 stop in debugBit 5 DBG_TIM15_STOP: TIM15 stop in debug

Bits 4:2 Reserved, must be kept at reset value.

Bit 1 DBG_TIM8_STOP: TIM8 stop in debugBit 0 DBG_TIM1_STOP: TIM1 stop in debug

DBGMCU APB2 peripheral freeze register CPU2 (DBGMCU_APB2FZ2)

Address offset: 0x038

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.DBG_F
DCAN_
STOP
Res.Res.Res.Res.Res.DBG_T
IM17_S
TOP
DBG_T
IM16_S
TOP
DBG_T
IM15_S
TOP
Res.Res.Res.DBG_T
IM8_ST
OP
DBG_T
IM1_ST
OP
rwrwrwrwrwrs

Bits 31:14 Reserved, must be kept at reset value.

Bit 13 DBG_FDCAN_STOP: FDCAN stop in debug

Bits 12:8 Reserved, must be kept at reset value.

Bit 7 DBG_TIM17_STOP: TIM17 stop in debug

Bit 6 DBG_TIM16_STOP: TIM16 stop in debug

Bit 5 DBG_TIM15_STOP: TIM15 stop in debug

Bits 4:2 Reserved, must be kept at reset value.

Bit 1 DBG_TIM8_STOP: TIM8 stop in debug

Bit 0 DBG_TIM1_STOP: TIM1 stop in debug

ST logo
ST logo

DBGMCU APB3 peripheral freeze register CPU1 (DBGMCU_APB3FZ1)

Address offset: 0x03C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_WWDG1_STOPRes.Res.DBG_IWDG2_STOPDBG_IWDG1_STOPRes.
rwrwrw

Bits 31:6 Reserved, must be kept at reset value.

Bit 5 DBG_WWDG1_STOP: WWDG1 stop in debug

0: Normal operation. WWDG1 continues to operate while Cortex-A35 is in debug mode.

1: Stop in debug. WWDG1 is frozen while Cortex-A35 is in debug mode.

Bits 4:3 Reserved, must be kept at reset value.

Bit 2 DBG_IWDG2_STOP: IWDG2 stop in debug

0: Normal operation. Watchdog continues to count while Cortex-A35 is in debug mode.

1: Stop in debug. Watchdog is frozen while Cortex-A35 is in debug mode.

Bit 1 DBG_IWDG1_STOP: IWDG1 stop in debug

0: Normal operation. Watchdog continues to count while Cortex-A35 is in debug mode.

1: Stop in debug. Watchdog is frozen while Cortex-A35 is in debug mode.

Bit 0 Reserved, must be kept at reset value.

DBGMCU APB3 peripheral freeze register CPU2 (DBGMCU_APB3FZ2)

Address offset: 0x040

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_WWDG1_STOPDBG_IWDG4_STOPDBG_IWDG3_STOPRes.Res.Res.
rwrwrw

Bits 31:6 Reserved, must be kept at reset value.

Bit 5 DBG_WWDG1_STOP: WWDG1 stop in debug

0: Normal operation. WWDG1 continues to operate while Cortex-M33 is in debug mode.

1: Stop in debug. WWDG1 is frozen while Cortex-M33 is in debug mode.

Bit 4 DBG_IWDG4_STOP: IWDG4 stop in debug

Bit 3 DBG_IWDG3_STOP: IWDG3 stop in debug

Bits 2:0 Reserved, must be kept at reset value.

DBGMCU APBSR peripheral freeze register CPU1 (DBGMCU_APBSRFZ1)

Address offset: 0x044

Reset value: 0x0000 0000

Bit 31Bit 30Bit 29Bit 28Bit 27Bit 26Bit 25Bit 24Bit 23Bit 22Bit 21Bit 20Bit 19Bit 18Bit 17Bit 16
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DBG_IDBG_LDBG_LDBG_IDBG_R
Res.Res.Res.Res.Res.Res.Res.3C3_SRes.PTIM4_PTIM3_2C3_SRes.Res.Res.TC_ST
TOPSTOPSTOPTOPOP
rwrwrwrwrs
Bit 8DBG_I3C3_STOP: I3C3 stop in debug
Bit 6DBG_LPTIM4_STOP: LPTIM4 stop in debug
Bit 5DBG_LPTIM3_STOP: LPTIM3 stop in debug
Bit 4DBG_I2C3_STOP: I2C3 stop in debug
Bit 0DBG_RTC_STOP: RTC clock is suspended in debug

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 DBG_I3C3_STOP: I3C3 stop in debug

Bit 7 Reserved, must be kept at reset value.

Bit 6 DBG_LPTIM4_STOP: LPTIM4 stop in debug

Bit 5 DBG_LPTIM3_STOP: LPTIM3 stop in debug

Bit 4 DBG_I2C3_STOP: I2C3 stop in debug

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 DBG_RTC_STOP: RTC clock is suspended in debug

DBGMCU APBSR peripheral freeze register CPU2 (DBGMCU_APBSRFZ2)

Address offset: 0x048

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.DBG_I3C3_STOPRes.DBG_LPTIM4_STOPDBG_LPTIM3_STOPDBG_I2C3_STOPRes.Res.Res.DBG_RTC_STOP
rwrwrwrwrs

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 DBG_I3C3_STOP: I3C3 stop in debug

Bit 7 Reserved, must be kept at reset value.

Bit 6 DBG_LPTIM4_STOP: LPTIM4 stop in debugBit 5 DBG_LPTIM3_STOP: LPTIM3 stop in debugBit 4 DBG_I2C3_STOP: I2C3 stop in debug

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 DBG_RTC_STOP: RTC clock is suspended in debug

DBGMCU DENABLE value observation (DBGMCU_DENABLE)

Address offset: 0x0F8

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.SPNIDENMSPIDENMNIDENMDBGENMDBGSWENSPNIDENASPIDENAHPDENDEVIC EENNIDENADBG ENALPDBG EN
rrrrrrrrrrrr

Bits 31:12 Reserved, must be kept at reset value.

Bit 11 SPNIDENM: secure non-invasive debug

0: Cortex-M33 secure non-invasive debug disable.

1: Cortex-M33 secure non-invasive debug enable.

Bit 10 SPIDENM: secure invasive debug

0: Cortex-M33 secure invasive debug disable.

1: Cortex-M33 secure invasive debug enable.

Bit 9 NIDENM: non-secure non-invasive debug

0: Cortex-M33 non-secure non-invasive debug disable.

1: Cortex-M33 non-secure non-invasive debug enable.

Bit 8 DBGENM: non-secure invasive debug

0: Cortex-M33 non-secure invasive debug disable.

1: Cortex-M33 non-secure invasive debug enable.

Bit 7 DBGSWEN: Invasive software debug enable

0: Invasive software debug disable.

1: Invasive software debug enable.

Bit 6 SPNIDENA: secure non-invasive debug

0: Cortex-A35 secure non-invasive debug disable.

1: Cortex-A35 secure non-invasive debug enable.

Bit 5 SPIDENA: secure invasive debug

0: Cortex-A35 secure invasive debug disable.

1: Cortex-A35 secure invasive debug enable.

Bit 4 HPDEN: HP debug

0: HP debug disable.

1: HP debug enable.

Bit 3 DEVICEEN: protection of access ports

0: device disable.

1: device enable.

Bit 2 NIDENA: non-secure non-invasive debug

0: Cortex-A35 non-secure non-invasive debug disable.

1: Cortex-A35 non-secure non-invasive debug enable.

Bit 1 DBGENA: non-secure invasive debug

0: Cortex-A35 non-secure invasive debug disable.

1: Cortex-A35 non-secure invasive debug enable.

Bit 0 LPDBGGEN: LP debug

0: LP debug disable

1: LP debug enable

DBGMCU host authentication register (DBGMCU_DBG_AUTH_HOST)

Address offset: 0x100

Reset value: 0x0000 0000

31302928272625242322212019181716
MESSAGE[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MESSAGE[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:0 MESSAGE[31:0] : Mailbox between debugger and processor

Read/write from debugger; read only from processor

DBGMCU device authentication register (DBGMCU_DBG_AUTH_DEV)

Address offset: 0x104

Reset value: 0x0000 0000

31302928272625242322212019181716
MESSAGE[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
MESSAGE[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:0 MESSAGE[31:0] : Mailbox between debugger and processor

Read/write from processor, read only from debugger

DBGMCU message read acknowledge authentication register (DBGMCU_DBG_AUTH_ACK)

Address offset: 0x108

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEVIC
E_ACK
HOST_
ACK
rr

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 DEVICE_ACK: Access status to DBG_AUTH_DEV register

1: Processor has written DBG_AUTH_DEV.

0: Debugger has read DBG_AUTH_DEV.

Bit 0 HOST_ACK: Access status to DBG_AUTH_HOST register

1: Debugger has written DBG_AUTH_HOST.

0: Processor has read DBG_AUTH_HOST.

DBGMCU register map

Table 924. DBGMCU register map and reset values

OffsetRegister name Reset313029282726252423222120191817161514131211109876543210
0x000DBGMCU_IDCREV_ID[15:0]ResResResResDEV_ID[11:0]
Reset valueXXXXXXXXXXXXXXXX010100000011
0x004DBGMCU_CRResResResResResResResResResResResResResResResResResResResRes
Reset value001
0x008DBGMCU_CRA35ResResResResResResResResResResResResResResResResResResResRes
Reset value000
0x00CReservedReserved
0x010DBGMCU_AHB2LFZ1DBG_HPDMA2_CH15_STOPDBG_HPDMA2_CH14_STOPDBG_HPDMA2_CH13_STOPDBG_HPDMA2_CH12_STOPDBG_HPDMA2_CH11_STOPDBG_HPDMA2_CH10_STOPDBG_HPDMA2_CH9_STOPDBG_HPDMA2_CH8_STOPDBG_HPDMA2_CH7_STOPDBG_HPDMA2_CH6_STOPDBG_HPDMA2_CH5_STOPDBG_HPDMA2_CH4_STOPDBG_HPDMA2_CH3_STOPDBG_HPDMA2_CH2_STOPDBG_HPDMA2_CH1_STOPDBG_HPDMA2_CH0_STOPDBG_HPDMA1_CH15_STOPDBG_HPDMA1_CH14_STOPDBG_HPDMA1_CH13_STOPDBG_HPDMA1_CH12_STOPDBG_HPDMA1_CH11_STOPDBG_HPDMA1_CH10_STOPDBG_HPDMA1_CH9_STOPDBG_HPDMA1_CH8_STOPDBG_HPDMA1_CH7_STOPDBG_HPDMA1_CH6_STOPDBG_HPDMA1_CH5_STOPDBG_HPDMA1_CH4_STOPDBG_HPDMA1_CH3_STOPDBG_HPDMA1_CH2_STOPDBG_HPDMA1_CH1_STOPDBG_HPDMA1_CH0_STOP
Reset value00000000000000000000000000000000
0x014DBGMCU_AHB2HFZ1ResResResResResResResResResResResResResResResResDBG_HPDMA3_CH15_STOPDBG_HPDMA3_CH14_STOPDBG_HPDMA3_CH13_STOPDBG_HPDMA3_CH12_STOPDBG_HPDMA3_CH11_STOPDBG_HPDMA3_CH10_STOPDBG_HPDMA3_CH9_STOPDBG_HPDMA3_CH8_STOPDBG_HPDMA3_CH7_STOPDBG_HPDMA3_CH6_STOPDBG_HPDMA3_CH5_STOPDBG_HPDMA3_CH4_STOPDBG_HPDMA3_CH3_STOPDBG_HPDMA3_CH2_STOPDBG_HPDMA3_CH1_STOPDBG_HPDMA3_CH0_STOP
Reset value0000000000000000
0x018DBGMCU_AHB2LFZ2DBG_HPDMA2_CH15_STOPDBG_HPDMA2_CH14_STOPDBG_HPDMA2_CH13_STOPDBG_HPDMA2_CH12_STOPDBG_HPDMA2_CH11_STOPDBG_HPDMA2_CH10_STOPDBG_HPDMA2_CH9_STOPDBG_HPDMA2_CH8_STOPDBG_HPDMA2_CH7_STOPDBG_HPDMA2_CH6_STOPDBG_HPDMA2_CH5_STOPDBG_HPDMA2_CH4_STOPDBG_HPDMA2_CH3_STOPDBG_HPDMA2_CH2_STOPDBG_HPDMA2_CH1_STOPDBG_HPDMA2_CH0_STOPDBG_HPDMA1_CH15_STOPDBG_HPDMA1_CH14_STOPDBG_HPDMA1_CH13_STOPDBG_HPDMA1_CH12_STOPDBG_HPDMA1_CH11_STOPDBG_HPDMA1_CH10_STOPDBG_HPDMA1_CH9_STOPDBG_HPDMA1_CH8_STOPDBG_HPDMA1_CH7_STOPDBG_HPDMA1_CH6_STOPDBG_HPDMA1_CH5_STOPDBG_HPDMA1_CH4_STOPDBG_HPDMA1_CH3_STOPDBG_HPDMA1_CH2_STOPDBG_HPDMA1_CH1_STOPDBG_HPDMA1_CH0_STOP
Reset value00000000000000000000000000000000

Table 924. DBGMCU register map and reset values (continued)

OffsetRegister name Reset313029282726252423222120191817161514131211109876543210
0x01CDBGMCU_AHB2HFZ2ResResResResResResResResResResResResResResResRes0DBG_HPDMA3_CH15_STOP0DBG_HPDMA3_CH14_STOP0DBG_HPDMA3_CH13_STOP0DBG_HPDMA3_CH12_STOP0DBG_HPDMA3_CH11_STOP0DBG_HPDMA3_CH10_STOP0DBG_HPDMA3_CH9_STOP0DBG_HPDMA3_CH8_STOP0DBG_HPDMA3_CH7_STOP0DBG_HPDMA3_CH6_STOP0DBG_HPDMA3_CH5_STOP0DBG_HPDMA3_CH4_STOP0DBG_HPDMA3_CH3_STOP0DBG_HPDMA3_CH2_STOP0DBG_HPDMA3_CH1_STOP0DBG_HPDMA3_CH0_STOP0
Reset value
0x020 - 0x028ReservedReserved
0x02CDBGMCU_APB1FZ1ResResDBG_TIM11_STOPDBG_TIM10_STOPResDBG_I3C2_STOPDBG_I3C1_STOPDBG_I2C2_STOPDBG_I2C1_STOPResResResResResResResResResResResResResDBG_LPTIM2_STOPDBG_LPTIM1_STOPDBG_TIM14_STOPDBG_TIM13_STOPDBG_TIM12_STOPDBG_TIM7_STOPDBG_TIM6_STOPDBG_TIM5_STOPDBG_TIM4_STOPDBG_TIM3_STOPDBG_TIM2_STOP
Reset value000000000000000000
0x030DBGMCU_APB1FZ2ResResDBG_TIM11_STOPDBG_TIM10_STOPResDBG_I3C2_STOPDBG_I3C1_STOPDBG_I2C2_STOPDBG_I2C1_STOPResResResResResResResResResResResResResDBG_LPTIM2_STOPDBG_LPTIM1_STOPDBG_TIM14_STOPDBG_TIM13_STOPDBG_TIM12_STOPDBG_TIM7_STOPDBG_TIM6_STOPDBG_TIM5_STOPDBG_TIM4_STOPDBG_TIM3_STOPDBG_TIM2_STOP
Reset value000000000000000000
0x034DBGMCU_APB2FZ1ResResResResResResResResResResResResResResResResResResResResResDBG_FDCAN_STOP0DBG_TIM17_STOP0DBG_TIM16_STOP0DBG_TIM15_STOP0ResResResResRes
Reset value000000
0x038DBGMCU_APB2FZ2ResResResResResResResResResResResResResResResResResResResResResDBG_FDCAN_STOP0DBG_TIM17_STOP0DBG_TIM16_STOP0DBG_TIM15_STOP0ResResResResRes
Reset value000000
0x03CDBGMCU_APB3FZ1ResResResResResResResResResResResResResResResResResResResResResResResResResResDBG_WWDG1_STOP0ResResResDBG_IWDG2_STOP0DBG_IWDG1_STOP0Res
Reset value000

Table 924. DBGMCU register map and reset values (continued)

OffsetRegister name Reset313029282726252423222120191817161514131211109876543210
0x040DBGMCU_APB3FZ2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_WWDG1_STOPDBG_IWDG4_STOPDBG_IWDG3_STOPRes.Res.
Reset value
0x044DBGMCU_APBSRFZ1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_I3C3_STOPRes.DBG_LPTIM4_STOPDBG_LPTIM3_STOPDBG_I2C3_STOPRes.Res.Res.DBG_RTC_STOP
Reset value0000
0x048DBGMCU_APBSRFZ2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBG_I3C3_STOPRes.DBG_LPTIM4_STOPDBG_LPTIM3_STOPDBG_I2C3_STOPRes.Res.Res.DBG_RTC_STOP
Reset value0000
0x0F8DBGMCU_DENABLERes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DBGENMDBGSWENSPIDENASPIDENAHPDENDEVICEENNIDENADBGENALPDBGREN
Reset value000000000
0x100DBGMCU_DBG_AUTH_HOSTMESSAGE[31:0]
Reset value00000000000000000000000000000000
0x104DBGMCU_DBG_AUTH_DEVMESSAGE[31:0]
Reset value00000000000000000000000000000000
0x108DBGMCU_DBG_AUTH_ACKRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEVICE_ACKHOST_ACK
Reset value00

80.10 Cortex-A35 debug features

The Cortex-A35 subsystem integrates the following CoreSight components (one of each per processor core):

These components are accessible by the debugger via the APB-AP and its associated debug APB bus. They are also accessible by both Cortex-A35 and Cortex-M33 via the system interconnect.

80.10.1 Cortex-A35 debug unit

The debug unit enables the debugger to access the debug features built into Cortex-A35. The debug features allow an external debugger to perform the following:

For detailed information on the debug unit, refer to the Cortex-A35 technical reference manual [9].

80.10.2 Cortex-A35 performance monitoring unit (PMU)

The performance monitoring unit contains six 32-bit event counters, and one 64-bit processor clock-cycle counter. The event counters can be configured to increment every time a specified event occurs. Examples of events that can be counted include:

When a counter wraps, it can generate an interrupt on PMUIRQ. This interrupt is connected to the CTI that can halt the processor cores, start or stop the trace.

Most of the events are connected to the ETM via the PMUEVENTS bus. This allows ETM resources to be used to filter the events. The filtered events are returned to the PMU via the four EXTOUT outputs of the ETM.

For a list of PMU events and the corresponding line of the PMUEVENTS bus, refer to the Cortex-A35 technical reference manual [9].

PMU registers

PMU registers are accessed by the debugger via the debug APB port.

Please refer to Section 80.9.1: System ROM tables for mapping.

The CPU can also access the PMU register via CP15 registers

80.10.3 Embedded trace macrocell (ETM)

The Cortex-A35 ETM is a CoreSight component closely coupled to the CPU. The ETM generates trace packets that allow the Cortex-A35 processor core execution to be traced. Only instruction execution can be traced.

The ETM receives information from the CPU over the processor trace interface, including:

For more information, refer to the Arm ETM v4 reference manual [6].

80.10.4 Cross trigger interface (CTI)

See Section 80.9.3: Cross trigger interface (CTI) and matrix (CTM).

80.11 Cortex-M33 debug features

The Cortex-M33 subsystem integrates the following CoreSight components:

These components are accessible by the debugger via the Cortex-M33 AHB-AP.

80.11.1 ROM tables

The ROM table is a CoreSight component that contains the base addresses of all CoreSight debug components accessible via the AHB-AP. These tables allow a debugger to discover the topology of the CoreSight system automatically.

There is one integration ROM table in the Cortex-M33 subsystem. This table is pointed to by the BASE register in Cortex-M33 AHB-AP. It links to the processor ROM table that contains the base address pointer for the system control space registers, which allow the debugger to identify the CPU core, as well as for the FPB, DWT, ITM, ETM and CTI.

The Cortex-M33 CPU ROM table occupies a 4-Kbyte, 32-bit wide chunk of address space, from 0xE00F F000 to 0xE00F FFFC.

Table 925. Cortex-M33 CPU ROM table
Address in ROM tableComponent nameComponent base addressComponent address offsetSize (Kbytes)Entry
0xE00F F000SCS0xE000 E0000xFFF0 F00040xFFF0 F003
0xE00F F004DWT0xE000 10000xFFF0 20000xFFF0 2003
0xE00F F008FPB0xE000 20000xFFF0 30000xFFF0 3003
0xE00F F00CITM0xE000 00000xFFF0 10000xFFF0 1003
0xE00F F010Reserved0xE004 00000xFFF4 10000xFFF4 1002
0xE00F F014ETM0xE004 10000xFFF4 20000xFFF4 2003
0xE00F E018CTI0xE004 20000xFFF4 30000xFFF4 3003
0xE00F F01CReserved0xE004 30000xFFF4 40000xFFF4 4002
0xE00F F020Top of table---0x0000 0000
0xE00F F024 to 0xE00F FFC8Reserved---0x0000 0000
0xE00F FFCC to 0xE00F FFFCROM table registers----

The topology for the CoreSight components in the Cortex-M33 subsystem is shown in the figure below.

Figure 1026. Cortex-M33 CoreSight topology Figure 1026: Cortex-M33 CoreSight topology block diagram showing AHB-AP pointing to integration ROM table, pointing to Cortex-M33 ROM table which points to SCS, DWT, FPB, ITM, ETM, and CTI component register blocks.

The diagram illustrates the Cortex-M33 CoreSight topology. It shows the flow of control from the BASE register (0xF8) and AHB-AP through the Cortex-M33 integration ROM table (0xE00FE000) to the Cortex-M33 ROM table (0xE00FF000). The ROM table contains entries for various CoreSight components, each with a register file base, PIDR4, and CIDR3. The components and their base addresses are:

The diagram also shows the mapping of offsets from the integration ROM table to the ROM table entries. For example, the offset 0x1000 in the integration ROM table maps to the SCS entry in the ROM table. The ROM table entries are also mapped to the corresponding components in the system control space.

Figure 1026: Cortex-M33 CoreSight topology block diagram showing AHB-AP pointing to integration ROM table, pointing to Cortex-M33 ROM table which points to SCS, DWT, FPB, ITM, ETM, and CTI component register blocks.

80.11.2 Data watchpoint and trace unit (DWT)

The DWT provides four comparators that can be used as:

The DWT also contains counters for:

A DWT comparator compares one of the following with the value in its DWT_COMP register:

For address matching, the comparator can use a mask, so it matches a range of addresses.

On a successful match, the comparator generates one of the following:

A watchpoint debug event either generates a DebugMonitor exception, or causes the processor to halt execution and enter debug state.

For more details on how to use the DWT, refer to the Arm Cortex-M33 processor technical reference manual [5].

80.11.3 Instrumentation trace macrocell (ITM)

The ITM generates trace information as packets. There are four sources that can generate packets. If multiple sources generate packets at the same time, the ITM arbitrates the order in which packets are output. The four sources in decreasing order of priority are:

The software can write directly to any of 32 x 32-bit ITM stimulus registers to generate packets. The permission level for each port can be programmed. When software writes to an enabled stimulus port, the ITM combines the identity of the port, the size of the write access, and the data written, into a packet that it writes to a FIFO. The ITM

outputs packets from the FIFO onto the trace bus. Reading a stimulus port register returns the status of the stimulus register (empty or pending) in bit 0.

For more details on how to use the ITM, refer to the Arm Cortex-M33 processor technical reference manual [5].

80.11.4 Breakpoint unit (FPB)

The FPB allows hardware breakpoints to be set. It contains eight comparators which monitor the instruction fetch address. If a match occurs, the instruction comparators can be configured to generate a breakpoint instruction.

80.11.5 Embedded trace macrocell (ETM)

The Cortex-M33 ETM is a CoreSight component closely coupled to the CPU. The ETM generates trace packets that allow the execution of the Cortex-M33 core to be traced.

Note: Data accesses are not included in the trace information.

The ETM receives information from the CPU over the processor trace interface, including:

For more information, refer to the Arm CoreSight ETM-Cortex-M33 technical reference manual [7].

80.11.6 Cross trigger interface (CTI)

See Section 80.9.3: Cross trigger interface (CTI) and matrix (CTM).

80.12 Debug authentication

80.12.1 Main characteristics

The debug authentication allows OEM or FAEs to restore constrained debug capabilities on a part in OEM-CLOSED or TZ-OEM-CLOSED state to debug the application (refer to Section 5: System security for details on these states).

In the product, the debug authentication approach relies on the following: even when the debug is closed there is always an access port available (the APB-AP, that is AP#0) to support communication between host debugger) and device (STM32 product).

The debug rights (controlled by BSEC) are reset by a power-on reset.

In OPEN state, the debugger can configure the debug peripherals. It has full access to the system without the need for an authentication, but it does not have access to the fuse secrets and unmapped ROM code (so called unconstrained debug).

During the boot ROM execution (TIL = 0), the debug is automatically disabled via hardware. Only the boot ROM itself has the possibility to re-enable debug in TIL = 0 (refer to boot ROM SRS).

When the debug is opened via certificate, the debugger can proceed with debug infrastructure configuration and may have access to limited resources (so called constrained debug). The debug certificate will contain the debugger access rights (secure/non-secure, TIL).

When the debug is closed the debugger can still proceed with the debug infrastructure 'discovery' but only 'sees' the authentication mailbox. Other debug and trace features are disabled.

80.12.2 Debug authentication protocol principle

The protocol implements a challenge response mechanism based on asymmetric cryptography to authenticate the host. It relies on a key pair, with a public key stored in the device, and a private key from the host library. The private key is used to sign a random value (the challenge) generated by the device.

The protocol implements a bidirectional communication between the debugger (host) and the device through a mailbox interface located in the DBGMCU.

The host can write to the mailbox via the JTAG/SWD interface. It expects to get responses and messages from the device via the same mailbox.

The debug authentication protocol is launched on a power-on reset of the device, when an "open request" message is posted by the host. The protocol is based on:

This is done using a tool to generate a token.

The implementation of the feature on the device is ensured by code embedded in the flash memory.

This code will be called automatically after reset if an initial message has been posted by the host in the mailbox.

After a first sequence of mutual authentication to align for example on the protocol version or type of device, the device generates a random value that should be signed by the host with a private key when building the response.

The device verifies the signed response including the random value using a public key embedded in the device.

80.12.3 Debug authentication protocol details

Whilst maintaining the device under reset through its SYSRESETn pin, the debugger writes dbg_auth_start message in DBG_AUTH_HOST register. It writes dbg_auth_start message in DBG_AUTH_HOST register.

Then the debugger releases the reset. From that time, the access to the DBGMCU is disabled through the AP0, and the debugger will read back permanently 0x00.

During its FSBL phase the CPU checks that DBG_AUTH_ACK bit 0 is set.

Then the CPU writes dbg_auth_challenge (RNG sample and UID) in DBG_AUTH_DEV register. This re-opens up the access to the DBGMCU through AP0.

The debugger stops polling for dbg_auth_challenge message and responds with dbg_auth_certificate message.

If the certificate is valid, the CPU unlocks the access ports by writing the appropriate value in the BSEC to allow debug peripherals configuration and sends dbg_auth_valid message to the debugger, then waits for dbg_auth_ack message.

The debugger configures the debug peripherals, sends CPU halt request (has effect only later on) and sends dbg_auth_ack.

Upon reception of the dbg_auth_ack, the CPU sets BSEC to the appropriate values that determine:

The CPU will ultimately halt at the appropriate software stage depending on rights embedded in the certificate (TIL where debug is authorized, Sec/N-Sec debug enabled).

80.13 DBGMCU authentication protocol status mailbox

A mailbox status information is relevant to inform the host or the device that a message is available for reading. This is especially mandatory when one side is sending a message larger than 32 bits. For instance, when the device is sending such a long message it will check that the host has read each 32-bit elements before writing a new one by polling the clear of bit DEVICE_ACK.

The register DBG_AUTH_ACK will be used for that purpose. This register is read-only for the host and the device.

device reads the register DBG_AUTH_HOST. The device will be polling this bit to know when the host has written a message.

To support a debug hot plug connection, two interruptions are generated:

Note: The interrupt is set with POR. This behavior is here to reuse the DBG_AUTH_ACK bits behavior (debugger_auth_read is DBG_AUTH_ACK[1] inverted while debugger_auth_write is DBG_AUTH_ACK[0]). Consequently, the interrupt should be configured as edge-triggered and not level sensitive.

80.14 Debug versus TIL

The debug can be unlocked from any TIL from TIL = 1 upwards. This is part of the debug credentials given through certificate.

80.15 References

Note: Some of these documents may not be available to customers due to Arm IP rules.

  1. 1. IHI 0031C (ID080813) - Arm® debug interface architecture specification ADIv5.0 to ADIv5.2, issue C, 8 Aug 2013.
  2. 2. DDI 0480F (ID100313) - Arm® CoreSight™ SoC-400 r3p1 technical reference manual, Issue F, 26th Sept 2013
  3. 3. DDI 0461B (ID010111) - Arm® CoreSight™ trace memory controller r0p1 technical reference manual, Issue B, 10 Dec 2010
  4. 4. DDI 0314H - Arm® CoreSight™ components technical reference manual, Issue H, 10 July, 2009
  5. 5. Arm® Cortex®-M33 processor r1p0 technical reference manual, Issue 0100-03, 19 June 2020
  6. 6. IHI0064F (ID42818) - Arm® embedded trace macrocell architecture specification v4, Issue F, 30 April 2018
  7. 7. ARM® CoreSight™ ETM-M33, revision: r0p1, technical reference manual, issue 0001-00, 03 February 2017
  8. 8. DDI 0528B (ID062514) - Arm® CoreSight™ STM system trace macrocell r0p1 technical reference manual, Issue B, 11 March 2014
  9. 9. Arm® Cortex®-A35 processor r1p0 technical reference manual, issue 0100-00, 28 February 2019