80. Debug support (DBG)
80.1 DBG introduction
A comprehensive set of debug features is provided to support software development and system integration:
- • Independent breakpoint debugging of each CPU core in the system
- • Code execution tracing
- • Software instrumentation
- • Cross-triggering
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:
- • SWJ-DP: JTAG/serial-wire debug port
- • AXI-AP: AXI access port
- • AHB-AP: AHB access port
- • APB-AP: APB access port
- • ITM: instrumentation trace macrocell
- • DWT: data watchpoint and trace
- • ETM: embedded trace macrocell
- • ETF: embedded trace FIFO
- • ETR: embedded trace router
- • TPIU: trace port interface unit
- • SWO: serial wire output
- • CTI: cross trigger interface
- • CTM: cross trigger matrix
- • Timestamp generator
- • STM: system trace macrocell
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:
- • Low cost software trace (Cortex-M33 only)
A limited trace capability is available over the single-wire debug output. This supports code instrumentation using “printf”, tracing of data and address watchpoints, interrupt detection and program counter sampling.
- • External debugging of each core independently
All processor cores can be simultaneously and independently debugged using equipment connected to the JTAG/SWD debug port. This allows breakpoint and watchpoint settings, code stepping, and memory access. - • Self-hosted debugging of each core independently
All processor cores can be simultaneously and independently debugged by software running on one of the cores. This allows breakpoint and watchpoint settings, code stepping, and memory access. - • Synchronous debugging of cores
When one core stops due to a breakpoint or a debugger stop command, other cores can be stopped as well. Similarly, the cores can be restarted at the same time. This allows debugging of loosely coupled applications which require the processors to remain synchronized. - • Tracing code execution from one or more cores via the trace port
The trace information from all cores is combined into a single trace stream and output to a trace port analyzer in real time. An ID embedded in the trace allows the analyzer to identify the source of each information packet. - • Code and hardware instrumentation via the trace port
The software data from the processors, memory content via DMA, and hardware event trace information can be generated using the STM. The information is combined with the processor trace stream and output to a trace port analyzer in real time. - • Capturing trace continuously into the ETF programmed as a circular buffer (ETB)
The combined trace information can be stored on-chip in a private circular buffer. The trace storage can be started and stopped by a debugger command, a software command, an external trigger signal, or an internal event. - • Capturing trace continuously into a system memory
Thanks to the ETR, the combined trace information can be sent to a system memory, either on-chip SRAM or off-chip DDR. The trace storage can be started and stopped by a debugger command, a software command, an external trigger signal, an internal event. - • Reading the stored trace with the debugger
The debugger can read the contents of the recorded trace data via the debug port. This is slower than the trace port, but allows basic trace functionality on the debugger without the cost of a trace port analyzer. - • Self-hosted trace analysis
The recorded trace data can be read by any of the processor cores. This powerful feature allows built-in test software to monitor code execution in real time, analyze and identify faults, autonomously handle exceptions. - • Uploading stored trace
The stored trace can also be uploaded to a host machine using one of the MPU communications interfaces (such as USB, USART, SPI, I2C, Ethernet, CAN). This is especially useful if the trace port is not accessible, for example remote monitoring and failure analysis of a deployed product.
80.3 DBG block diagram
Figure 1017. Block diagram of debug support infrastructure

The diagram illustrates the debug support infrastructure, organized into four main functional blocks: Dap Layer, Cortex-M33 core, Cortex-A35MP core, and CSEM.
- Dap Layer: Manages external debug interfaces including JTAG/serial-wire port, JTMS/SWDIO, JTDI, JTDO, JTCK/SWCLK, and nJTRST. It contains the SWJ-DP1 block which connects to the DAPBUS.
- Cortex-M33 core: Includes components like DWT1, FPB1, ITM1, Cortex-M33 core, ROM table1, CTI1, and ETM1. It connects to the AHB bus and a Replicator.
- Cortex-A35MP core: Includes CTI1, Cortex-A35 core, ETM1, and ROM table1.
- CSEM: Contains the System bus matrix, APB mux, APB-D, ROM table1, Timestamp generator1, STM5001, Funnel1, SWO1, ETF1 (with SRAM), ETR1, Replicator, and TPIU1.
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
1. Arm CoreSight component.
80.4 DBG pins
Table 896. JTAG/Serial-wire debug port pins
| Pin name | JTAG debug port | SWD debug port | Pin assignment | ||
|---|---|---|---|---|---|
| Type | Description | Type | Description | ||
| JTMS/SWDIO | I | JTAG test mode select | I/O | Serial-wire data in/out | - |
| JTCK/SWCLK | I | JTAG test clock | I | Serial-wire clock | - |
| JTDI | I | JTAG test data input | - | - | - |
| JTDO | O | JTAG test data output | - | - | - |
| NJTRST | I | JTAG test reset | - | - | - |
Table 897. Trace port pins
| Pin name | Type | Description | Pin assignment |
|---|---|---|---|
| TRACED[15:0] | O | Trace synchronous data out (can be 1, 2, 4, 8 or 16 pins) | Refer to Datasheet |
| TRACECLK | O | Trace clock |
Table 898. Serial-wire trace port pins
| Pin name | Type | Description | Pin assignment |
|---|---|---|---|
| TRACESWO | O | Trace asynchronous data out | (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 name | Type | Description | Pin assignment |
|---|---|---|---|
| DBTRGI | I | External trigger input to CTI | Refer to Datasheet |
| DBTRGO | O | External 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
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:
- • DEVICEEN: Controls access to debug components via the external debug port.
- 0: External debugger has no access to debug components or system interconnect.
- 1: External debugger has access to debug components and system interconnect. External access to secure system interconnect depends on SPIDEN state.
- • DBGEN: Global enable for all debug and trace features
- 0: All debug features are disabled.
- 1: Debug features in nonsecure mode are enabled. Debug features in secure mode depend on SPIDEN state.
- • SPIDEN: Enables debug in secure privileged mode when DBGEN = 1.
- 0: Debug features are disabled in secure privileged mode. External access to secure system interconnect is disabled.
- 1: Debug features are enabled in secure privileged mode. External access to secure system interconnect is enabled.
- • NIDEN: Enables trace and performance monitoring (non-invasive debug).
- 0: Trace generation is disabled.
- 1: Trace generation in nonsecure mode is enabled. Trace generation in nonsecure mode depends on SPIDEN state.
- • SPNIDEN: Enables trace and performance monitoring in secure privileged mode when NIDEN = 1.
- 0: Trace generation is disabled in secure privileged mode.
- 1: Trace generation is enabled in secure privileged mode.
- • DBGSWEN: Enables self-hosted debug (by a software running on a processor).
- 0: Software access to debug components on the APB-AP is disabled.
- 1: Software access to debug components on the APB-AP is enabled.
- • AP_UNLOCK: Enables all accesses to DBGMCU (while only a few are accessible if this protection is activated, refer to register description for more information).
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_UNLOCK | DEVICEEN | DBGEN | SPIDEN | NIDEN | SPNIDEN | DBGSWEN |
|---|---|---|---|---|---|---|---|
| DBGMCU APB-AP | X(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 | - | - | X | X | - | - | X |
| TSGEN | - | - | - | - | - | - | X |
| TPIU | - | - | - | - | - | - | X |
- 1. DBGMCU_APB_AP is open under reset, closed immediately after SYSTEM_RST is released, until AP_UNLOCKED is configured.
- 2. Cortex-M33 dedicated subset of authentication signals.
- 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 state | Description |
|---|---|---|
| Open device | All ones | All debug and trace is enabled at boot-up. |
| Closed device | All zeros | All 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
| Name | Address | Description | read/write |
|---|---|---|---|
| SECSTS | 0b001 | Status of BSEC_DENR register | R |
| DBGCTL | 0b010 | Connected to BSEC_JTAGINR register | W |
| DBGSTS | 0b011 | Connected to BSEC_JTAGOUTR register | R |
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:
- • 5-pin standard JTAG interface (JTAG-DP)
- • 2-pin (clock + data) serial-wire debug port (SW-DP)
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:
- • SWCLK: clock from host to target • SWDIO: bi-directional serial data (100 kΩ pull-up required)
Serial data is transferred LSB first, synchronously with the clock. A transfer comprises the following phases:
- 1. packet request (8 bits) transmitted by the host 2. acknowledge response (3 bits) transmitted by the target 3. data transfer (33 bits) transmitted by the host (for a write) or target (for a read)
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

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
- 1. AP0: DBGMCU access port (APB-AP). Allows access to DBGMCU only.
- 2. AP1: Debug access port (APB-AP). Allows access to the CoreSight™ components on the debug APB bus, including the Cortex-A35.
- 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. 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 state | AP_UNLOCK | CPU write once any value in authentication device register | AP status | DBGMCU register authorized registers |
|---|---|---|---|---|
| Power reset released, system reset asserted | 0 | NA | AP opened | Deviceld, DENABLE, all authentication registers accessible |
| System reset released, opened part | B4 | Yes or no | AP opened | All registers accessible |
| System reset released, closed part | B4 | Yes or no | AP opened | All registers accessible |
| System reset released, closed part | Others | No | AP closed | NA |
| System reset released, closed part | Others | Yes | AP opened | Authorized registers: Deviceld, DENABLE, all authentication registers Locked registers: debug control, freeze registers |
Table 904. AP1 (debug APB) authentication behavior
| DEVICEEN | Others authentication signals | Behavior |
|---|---|---|
| 0 | X | All 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
| DEVICEEN | SPIDEN | Others authentication signals | Behavior |
|---|---|---|---|
| 0 | X | X | All transfers blocked. Any attempt to perform a transfer will result in an error. |
| 1 | 0 | - | Secure transfers blocked. Any attempt to perform a secure transfer will result in an error. Nonsecure transfers are enabled. |
| 1 | 1 | - | Both nonsecure and secure transfers are enabled. |
80.9 System debug features
The system debug features include the following CoreSight components:
- • System ROM tables
- • Global trace timestamp generator (TSGEN)
- • System cross-trigger interface (CTI)
- • Cross-trigger matrix (CTM)
- • Trace port interface Unit (TPIU)
- • Trace bus funnel (CSTF)
- • Embedded trace FIFO (ETF)
- • Embedded trace router (ETR)
- • Replicator
- • System trace macrocell (STM)
- • Serial wire output (SWO)
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:
- • from 0x8000 0000 to 0x8000 0FFC when accessed by the JTAG debugger through the debug APB-AP
- • from 0x4A00 0000 to 0x4A00 0FFC when accessed from the system bus
Each component referenced in the ROM table occupies a 64-Kbyte range.
Table 906. Debug subsystem ROM table
| Address offset in ROM table | Component name | Component base address (system bus) | Component base address (debugger) | Component address offset | Data |
|---|---|---|---|---|---|
| 0x000 | Funnel | 0x4A01 0000 | 0x8001 0000 | 0x10000 | 0x0001 0003 |
| 0x004 | ETF | 0x4A02 0000 | 0x8002 0000 | 0x20000 | 0x0002 0003 |
| 0x008 | ETR | 0x4A03 0000 | 0x8003 0000 | 0x30000 | 0x0003 0003 |
| 0x00C | TPIU | 0x4A04 0000 | 0x8004 0000 | 0x40000 | 0x0004 0003 |
| 0x010 | Replicator | 0x4A05 0000 | 0x8005 0000 | 0x50000 | 0x0005 0003 |
| 0x014 | Timestamp generator | 0x4A06 0000 | 0x8006 0000 | 0x60000 | 0x0006 0003 |
| Address offset in ROM table | Component name | Component base address (system bus) | Component base address (debugger) | Component address offset | Data |
|---|---|---|---|---|---|
| 0x018 | STM500 | 0x4A07 0000 | 0x8007 0000 | 0x70000 | 0x0007 0003 |
| 0x01C | CTI0 | 0x4A08 0000 | 0x8008 0000 | 0x80000 | 0x0008 0003 |
| 0x020 | CTI1 | 0x4A09 0000 | 0x8009 0000 | 0x90000 | 0x0009 0003 |
| 0x024 | SWO | 0x4A0A 0000 | 0x800A 0000 | 0xA0000 | 0x000A 0003 |
| 0x028 | Cortex-A35 ROM table | 0x4A20 0000 | 0x8020 0000 | 0x200000 | 0x0020 0003 |
| 0x02C | Top of table | - | - | - | 0x0000 0000 |
| 0x030 to 0xFC8 | Reserved | - | - | - | 0x0000 0000 |
| 0xFCC to 0xFFC | ROM 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:
- • from 0x8020 0000 to 0x8020 0FFC when accessed by the debugger
- • from 0x4A20 0000 to 0x4A20 0FFC when accessed from the system bus
| Address offset in ROM table | Component name | Component base address (system bus) | Component base address (debugger) | Component address offset | Entry |
|---|---|---|---|---|---|
| 0x000 | CA35_0_DBG | 0x4A21 0000 | 0x8021 0000 | 0x1 0000 | 0x0001 0003 |
| 0x004 | CA35_0_CTI | 0x4A22 0000 | 0x8022 0000 | 0x2 0000 | 0x0002 0003 |
| 0x008 | CA35_0_PMU | 0x4A23 0000 | 0x8023 0000 | 0x3 0000 | 0x0003 0003 |
| 0x00C | CA35_0_ETM | 0x4A24 0000 | 0x8024 0000 | 0x4 0000 | 0x0004 0003 |
| 0x010 | Top of table | - | - | - | 0x0000 0000 |
| 0x014 to 0xFC8 | Reserved | - | - | - | 0x0000 0000 |
| 0xFCC to 0xFFC | ROM 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 table | Component name | Component base address (system bus) | Component base address (debugger) | Component address offset | Data |
|---|---|---|---|---|---|
| 0x000 | DBGMCU | 0x440A 0000 | 0x8000 1000 | 0x1000 | 0x0000 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

The diagram illustrates the CoreSight components topology, showing the mapping between ROM tables and hardware components. The components and their base addresses are:
- Debug Subsystem ROM table @0x80000000
- Offsets: 0x010000, 0x020000, 0x030000, 0x040000, 0x050000, 0x060000, 0x070000, 0x080000, 0x090000, 0x0A0000, 0x200000, 0xFD0 (PIDR4), 0xFFC (CIDR3).
- Connections:
- 0x010000 → Trace Funnel (CSTF) @0x80010000
- 0x020000 → Embedded Trace Router (ETR) @0x80030000
- 0x030000 → Replicator @0x80050000
- 0x040000 → System Trace Macrocell (STM) @0x80070000
- 0x050000 → System CTI0 @0x80080000
- 0x060000 → System CTI1 @0x80090000
- 0x070000 → Trace FIFO (ETF) @0x80020000
- 0x080000 → Trace Port Interface (TPIU) @0x80040000
- 0x090000 → Timestamp Generator (TSGEN) @0x80060000
- 0x0A0000 → Serial Wire Output (SWO) @0x800A0000
- Cortex-A35 ROM table @0x80200000
- Offsets: 0x010000, 0x020000, 0x030000, 0x040000, 0xFD0 (PIDR4), 0xFFC (CIDR3).
- Connections:
- 0x010000 → C-A35_0 Debug @0x80210000
- 0x020000 → C-A35_0 PMU @0x80230000
- 0x030000 → C-A35_0 CTI @0x80220000
- 0x040000 → C-A35_0 ETM @0x80240000
Each component block contains: Register file base (0x000), PIDR4 (0xFD0), and CIDR3 (0xFFC).
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:
- • Start and stop the timestamp incrementing.
- • Cause the timestamp counter to stop when debug state is entered. To enable this feature, the debug subsystem CTI must be configured to signal to the timestamp generator when system-wide debug state has been entered (all CPU cores halted).
- • Read the current timestamp value.
- • Change the current timestamp value. The timestamp counter must be halted while it is changed. When the timestamp value is changed, the timestamp generator resynchronizes all trace sources.
- • Change the reported timestamp increment.
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

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:
- STM Path: The replicator output goes to a Timestamp decoder, which outputs 64 bits to the STM.
- High-frequency CPU domain: The replicator output goes to a Timestamp decoder (outputting 64 bits), then to a Timestamp interpolator (outputting 64 bits), which feeds into the ETM of the Cortex-A35.
- Cortex-M33 subsystem domain: The replicator output goes to a Timestamp decoder (outputting 48 bits), then to a Timestamp interpolator (outputting 48 bits), which feeds into both the ETM and ITM of the Cortex-M33.
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.
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]](/RM0506-STM32MP21/eecabd6cc68981bc6a57b436bb75893e_img.jpg)
The diagram shows the Embedded cross trigger architecture consisting of four main Cross Trigger Interfaces (CTIs) interconnected by CTM channels [3:0]:
- Cortex-A35_0 CTI (connected via APB-Debug):
- Inputs: TRIGIN0 (from Cortex-A35_0 CPU DBGTRIGGER), TRIGIN1 (from PMU PMUIRQ), TRIGIN4–TRIGIN7 (from ETM EXTOUT0–EXTOUT3).
- Outputs: TRIGOUT0 (to Cortex-A35_0 CPU EDBGRQ), TRIGOUT1 (to Cortex-A35_0 CPU DBGRESTART), TRIGOUT2 (to GIC400 CTIIRQ0), TRIGOUT4–TRIGOUT7 (to ETM EXTIN0–EXTIN3).
- Debug subsystem CTI_0 (connected via APB-Debug):
- Inputs: TRIGIN0 (ETRFULL from ETR), TRIGIN1 (ETRACQCOMP from ETR), TRIGIN2 (ETFFULL from ETF), TRIGIN3 (ETFACQCOMP from ETF), TRIGIN4 (TRIGOUTSPTE from STM), TRIGIN5 (TRIGOUTSW from STM), TRIGIN6 (TRIGOUTHETE from STM), TRIGIN7 (ASYNCOUT from STM).
- Outputs: TRIGOUT0 (ETRFLUSH to ETR), TRIGOUT1 (ETRTRIG to ETR), TRIGOUT2 (ETFFLUSH to ETF), TRIGOUT3 (ETFTRIG to ETF), TRIGOUT4 (TPIUFLUSH to TPIU), TRIGOUT5 (TPIUTRIG to TPIU).
- Debug subsystem CTI_1 (connected via APB-Debug):
- Inputs: TRIGIN0 (from DBTRGI).
- Outputs: TRIGOUT0 (to DBTRGO), TRIGOUT1 (HWEVENTA to STM), TRIGOUT2 (HWEVENTB to STM), TRIGOUT3 (HLTDBG_req to TSGEN), TRIGOUT4 (HLTDBG_restart to TSGEN).
- Cortex-M33 CTI (connected via PPB-M33):
- Inputs: TRIGIN0 (HALTED from Cortex-M33 CPU), TRIGIN1 (DWT_COMP0 from DWT), TRIGIN2 (DWT_COMP1 from DWT), TRIGIN3 (DWT_COMP2 from DWT), TRIGIN4 (ETMEVENTO_0 from ETM), TRIGIN5 (ETMEVENTO_1 from ETM).
- Outputs: TRIGOUT0 (EDBGRQ to Cortex-M33 CPU), TRIGOUT1 (DBGRESTART to Cortex-M33 CPU), TRIGOUT2 (CTIIRQ0 to Cortex-M33 CPU), TRIGOUT3 (CTIIRQ1 to Cortex-M33 CPU), TRIGOUT4–TRIGOUT7 (ETMEVENTIN_0–ETMEVENTIN_3 to ETM).
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 signal | Source component | Comments |
|---|---|---|---|
| 0 | ETRFULL | ETR | ETR full flag. Allows a debug event to be generated when the trace buffer is full. |
| 1 | ETRACQCOMP | ETR | ETR capture finished. Allows a debug event to be generated when trace acquisition is complete. |
| 2 | ETFFULL | ETF | ETF full flag. Allows a debug event to be generated when the trace FIFO is full. |
| 3 | ETFACQCOMP | ETF | ETF capture finished. Allows a debug event to be generated when the trace FIFO is empty. |
| 4 | TRIGOUTSPTE | STM | The STM asserts this signal for one clock cycle when a trigger event is detected on a match using STMSPTER. |
| 5 | TRIGOUTSW | STM | The 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. |
| 6 | TRIGOUTHETE | STM | The STM asserts this signal for one clock cycle when a trigger event is detected on a match using STMHETER. |
| 7 | ASYNCOUT | STM | Alignment 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. |
| - | Output signal | Destination component | Comments |
|---|---|---|---|
| 0 | ETRFLUSH | ETR | ETR flush trigger. Causes trace sources to be flushed into destination memory. |
| 1 | ETRTRIG | ETR | ETR trigger. Causes various kinds of flush, stops the TMC, and causes additional trigger insertion. |
| 2 | ETFFLUSH | ETF | ETF flush trigger. Causes trace FIFO to be flushed. |
| 3 | ETFTRIG | ETF | ETF enable trigger. Starts filling the trace FIFO. |
| 4 | TPIUFLUSH | TPIU | Trace port flush trigger. Causes TPIU FIFO to be flushed. |
| 5 | TPIUTRIG | TPIU | Trace port enable trigger. Starts trace output on the external trace port. |
| 6 | - | - | Not used |
| 7 | - | - | Not used |
| - | Source signal | Source component | Comments |
|---|---|---|---|
| 0 | DBTRGI | GPIO | External 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 |
| - | Output signal | Destination component | Comments |
|---|---|---|---|
| 0 | DBTRGO | GPIO | External I/O trigger output. Allows monitoring of events on external DBTRGO pin. |
| 1 | HWEVENTA | STM | STM hardware event |
| 2 | HWEVENTB | STM | STM hardware event |
| 3 | HLTDBG_req | TSGEN | Halt timestamp in debug. Freezes TSGEN timestamp counter. |
| 4 | HLTDBG_restart | TSGEN | Halt timestamp in debug. Unfreezes TSGEN timestamp counter. |
| 5 | - | - | Not used |
| 6 | - | - | Not used |
| 7 | - | - | Not used |
| - | Source signal | Source component | Comments |
|---|---|---|---|
| 0 | DBGTRIGGER | Cortex-A35 CPU | Pulsed high when the core enters in debug state |
| 1 | PMUIRQ | PMU | Performance monitor interrupt with inverted polarity |
| 2 | - | - | Not used |
| 3 | - | - | Not used |
| 4 | EXTOUT0 | ETM | ETM external trigger output |
| 5 | EXTOUT1 | ETM | ETM external trigger output |
| 6 | EXTOUT2 | ETM | ETM external trigger output |
| 7 | EXTOUT3 | ETM | ETM external trigger output |
| - | Output signal | Destination component | Comments |
|---|---|---|---|
| 0 | EDBGRQ | Cortex-A35 CPU | CPU halt request. Puts the CPU in debug mode. |
| 1 | DBGRESTART | Cortex-A35 CPU | CPU restart request. The CPU exits debug mode. |
| 2 | CTIIRQ | GIC | CTI interrupt |
| 3 | - | - | Not used |
| 4 | EXTIN0 | ETM | ETM external input |
| 5 | EXTIN1 | ETM | ETM external input |
| 6 | EXTIN2 | ETM | ETM external input |
| 7 | EXTIN3 | ETM | ETM external input |
| - | Source signal | Source component | Comments |
|---|---|---|---|
| 0 | HALTED | Cortex-M33 CPU | Pulsed high when the core enters in debug state |
| 1 | DWTCOMP_0 | Cortex-M33 DWT | DWT comparator output |
| 2 | DWTCOMP_1 | Cortex-M33 DWT | DWT comparator output |
| 3 | DWTCOMP_2 | Cortex-M33 DWT | DWT comparator output |
| 4 | ETMEVENTO_0 | Cortex-M33 ETM | ETM event output |
| 5 | ETMEVENTO_0 | Cortex-M33 ETM | ETM event output |
| 6 | - | - | Not used |
| 7 | - | - | Not used |
| - | Source signal | Destination component | Comments |
|---|---|---|---|
| 0 | EDBGRQ | Cortex-M33 CPU | CPU halt request. Puts the CPU in debug mode. |
| 1 | DBGRESTART | Cortex-M33 CPU | CPU restart request. The CPU exits debug mode. |
| 2 | IRQ0 | Cortex-M33 NVIC | CTI interrupt |
| 3 | IRQ1 | Cortex-M33 NVIC | CTI interrupt |
| 4 | ETMEVENTIN_0 | Cortex-M33 ETM | ETM event input |
| 5 | ETMEVENTIN_1 | Cortex-M33 ETM | ETM event input |
| 6 | ETMEVENTIN_2 | Cortex-M33 ETM | ETM event input |
| 7 | ETMEVENTIN_3 | Cortex-M33 ETM | ETM 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

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.
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

MSv66592V3
To force the processors to restart simultaneously, the debugger must use the following procedure:
- 1. Clear debug request by writing 0x01, then 0x00, to CTIINTACK register in each CTI.
- 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:
- • S0: Cortex-A35_0 ETM
- • S1: Reserved
- • S2: STM
- • S3: Cortex-M33 ETM
- • S4: Cortex-M33 ITM
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. The arbiter selects the slave port with the highest assigned priority that has data valid.
- 2. Up to
min_hold_timetransfers are passed from the selected slave to the master port, wheremin_hold_timeis programmable in the CONTROL register. - 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:
- • ETM of Cortex-A35 core
- • ITM and ETM of Cortex-M33
- • STM
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):
- • Hardware FIFO mode
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.
- • Software FIFO mode
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.
- • Circular buffer mode (embedded trace buffer)
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:
- – via the trace port: With the TPIU enabled, the contents of the buffer are output over the trace port. This can be done by setting the DrainBuffer bit in the ETF_FFCR register.
- – via the ETR: The buffer can be sent out to memory, either internal such as SRAM, or external such as DDR. With the ETR enabled, this can be done by setting the DrainBuffer bit in the ETF_FFCR register.
- – via the debug port: the debugger can read the buffer via the RRD register which is accessible over the debug APB.
- – by software: Either processor can read the buffer via the RRD register, since the debug APB is accessible from the system bus. This can also be performed by software triggered DMA transfers. No hardware DMA request is available so the FULL flag can be used to trigger an interrupt to the appropriate core via the cross trigger. The software can then read the ETF_CBUFLVL register to find out the number of data to be read.
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:
- • AXI control register: It contains a field indicating the maximum number of data transfers that can occur within each burst initiated by the TMC on the AXI master interface.
- • data buffer address low and high registers: They contain the 32-bit address used to locate the trace buffer in the system memory.
- • formatter and flush control register: It enables the trace data to be TWP formatted with only frames (no padding or syncs). When disabled, the data is raw data from the ATB input, without the ID.
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 port | Trace sink |
|---|---|
| #0 | ETR |
| #1 | TPIU |
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:
- • no formatter
- • no pattern generator
- • an 8-bit ATB input
- • no synchronous trace output (no TRACEDx or TRACECLK pin)
- • no support for flush (because this is not required)
- • no support for triggering
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

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.
The STM is configured with the following values:
- • DATA_FIFO_DEPTH = 16
- • CHN_FIFO_DEPTH = 8
- • HW_EVOBIF_PRESENT = TRUE
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 offset | Name | Description |
|---|---|---|
| 0x00 | G_DMTS | Data, marked with timestamp, guaranteed |
| 0x08 | G_DM | Data, marked, guaranteed |
| 0x10 | G_DTS | Data, with timestamp, guaranteed |
| 0x18 | G_D | Data, guaranteed |
| 0x20-0x58 | - | Reserved |
| 0x60 | G_FLAGTS | Flag with timestamp, guaranteed |
| 0x68 | G_FLAG | Flag, guaranteed |
| 0x70 | G_TRIGTS | Trigger with timestamp, guaranteed |
| 0x78 | G_TRIG | Trigger, guaranteed |
| 0x80 | I_DMTS | Data, marked with timestamp, invariant timing |
| 0x88 | I_DM | Data, marked, invariant timing |
| 0x90 | I_DTS | Data, with timestamp, invariant timing |
| 0x98 | I_D | Data, invariant timing |
| 0xA0-0xD8 | - | Reserved |
| 0xE0 | I_FLAGTS | Flag with timestamp, invariant timing |
| 0xE8 | I_FLAG | Flag, invariant timing |
| 0xF0 | I_TRIGTS | Trigger with timestamp, invariant timing |
| 0xF8 | I_TRIG | Trigger, 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:
- • Bit [7] = 0
- • Bit [6] = secure/nonsecure state
- • Bit [5:0] = master ID
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
| Master | Secure access ID | Nonsecure access ID |
|---|---|---|
| Cortex-A35 processor core0 | 0x00 | 0x40 |
| Cortex-M33 | 0x02 | 0x42 |
| Master | Secure access ID | Nonsecure access ID |
|---|---|---|
| HPDMA1 | 0x03 | 0x43 |
| HPDMA2 | 0x04 | 0x44 |
| HPDMA3 | 0x05 | 0x45 |
| DAP-AXI-AP | 0x06 | 0x46 |
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| Bank | Event | EXTMUX(7:0) = 0 | EXTMUX(7:0) = 1 | EXTMUX(7:0) = 2 | EXTMUX(7:0) = 3 |
|---|---|---|---|---|---|
| HEBS = 0 | 0 | HPDMA1_ch0_cpu1_irq | HPDMA2_ch0_cpu1_irq | HPDMA3_ch0_cpu1_irq | - |
| 1 | HPDMA1_ch1_cpu1_irq | HPDMA2_ch1_cpu1_irq | HPDMA3_ch1_cpu1_irq | - | |
| 2 | HPDMA1_ch2_cpu1_irq | HPDMA2_ch2_cpu1_irq | HPDMA3_ch2_cpu1_irq | - | |
| 3 | HPDMA1_ch3_cpu1_irq | HPDMA2_ch3_cpu1_irq | HPDMA3_ch3_cpu1_irq | - | |
| 4 | HPDMA1_ch4_cpu1_irq | HPDMA2_ch4_cpu1_irq | HPDMA3_ch4_cpu1_irq | - | |
| 5 | HPDMA1_ch5_cpu1_irq | HPDMA2_ch5_cpu1_irq | HPDMA3_ch5_cpu1_irq | - | |
| 6 | HPDMA1_ch6_cpu1_irq | HPDMA2_ch6_cpu1_irq | HPDMA3_ch6_cpu1_irq | - | |
| 7 | HPDMA1_ch7_cpu1_irq | HPDMA2_ch7_cpu1_irq | HPDMA3_ch7_cpu1_irq | - | |
| 8 | HPDMA1_ch8_cpu1_irq | HPDMA2_ch8_cpu1_irq | HPDMA3_ch8_cpu1_irq | - | |
| 9 | HPDMA1_ch9_cpu1_irq | HPDMA2_ch9_cpu1_irq | HPDMA3_ch9_cpu1_irq | - | |
| 10 | HPDMA1_ch10_cpu1_irq | HPDMA2_ch10_cpu1_irq | HPDMA3_ch10_cpu1_irq | - | |
| 11 | HPDMA1_ch11_cpu1_irq | HPDMA2_ch11_cpu1_irq | HPDMA3_ch11_cpu1_irq | - | |
| 12 | HPDMA1_ch12_cpu1_irq | HPDMA2_ch12_cpu1_irq | HPDMA3_ch12_cpu1_irq | - | |
| 13 | HPDMA1_ch13_cpu1_irq | HPDMA2_ch13_cpu1_irq | HPDMA3_ch13_cpu1_irq | LPTIMER1_IT_irq | |
| 14 | HPDMA1_ch14_cpu1_irq | HPDMA2_ch14_cpu1_irq | HPDMA3_ch14_cpu1_irq | LPTIMER2_IT_irq |
Table 920. Hardware event mapping 0 to 3 (continued)
| Bank | Event | EXTMUX(7:0) = 0 | EXTMUX(7:0) = 1 | EXTMUX(7:0) = 2 | EXTMUX(7:0) = 3 |
|---|---|---|---|---|---|
| HEBS = 0 | 15 | HPDMA1_ch15_cpu1_irq | HPDMA2_ch15_cpu1_irq | HPDMA3_ch15_cpu1_irq | LPTIMER3_IT_irq |
| 16 | HPDMA1_ch0_cpu2_irq | HPDMA2_ch0_cpu2_irq | HPDMA3_ch0_cpu2_irq | LPTIMER4_IT_irq | |
| 17 | HPDMA1_ch1_cpu2_irq | HPDMA2_ch1_cpu2_irq | HPDMA3_ch1_cpu2_irq | LPTIMER5_IT_irq | |
| 18 | HPDMA1_ch2_cpu2_irq | HPDMA2_ch2_cpu2_irq | HPDMA3_ch2_cpu2_irq | - | |
| 19 | HPDMA1_ch3_cpu2_irq | HPDMA2_ch3_cpu2_irq | HPDMA3_ch3_cpu2_irq | SPI1_irq | |
| 20 | HPDMA1_ch4_cpu2_irq | HPDMA2_ch4_cpu2_irq | HPDMA3_ch4_cpu2_irq | SPI2_irq | |
| 21 | HPDMA1_ch5_cpu2_irq | HPDMA2_ch5_cpu2_irq | HPDMA3_ch5_cpu2_irq | SPI3_irq | |
| 22 | HPDMA1_ch6_cpu2_irq | HPDMA2_ch6_cpu2_irq | HPDMA3_ch6_cpu2_irq | SPI4_irq | |
| 23 | HPDMA1_ch7_cpu2_irq | HPDMA2_ch7_cpu2_irq | HPDMA3_ch7_cpu2_irq | SPI5_irq | |
| 24 | HPDMA1_ch8_cpu2_irq | HPDMA2_ch8_cpu2_irq | HPDMA3_ch8_cpu2_irq | SPI6_irq | |
| 25 | HPDMA1_ch9_cpu2_irq | HPDMA2_ch9_cpu2_irq | HPDMA3_ch9_cpu2_irq | SPI7_irq | |
| 26 | HPDMA1_ch10_cpu2_irq | HPDMA2_ch10_cpu2_irq | HPDMA3_ch10_cpu2_irq | - | |
| 27 | HPDMA1_ch11_cpu2_irq | HPDMA2_ch11_cpu2_irq | HPDMA3_ch11_cpu2_irq | - | |
| 28 | HPDMA1_ch12_cpu2_irq | HPDMA2_ch12_cpu2_irq | HPDMA3_ch12_cpu2_irq | SAI1_irq | |
| 29 | HPDMA1_ch13_cpu2_irq | HPDMA2_ch13_cpu2_irq | HPDMA3_ch13_cpu2_irq | SAI2_irq | |
| 30 | HPDMA1_ch14_cpu2_irq | HPDMA2_ch14_cpu2_irq | HPDMA3_ch14_cpu2_irq | SAI3_irq | |
| 31 | HPDMA1_ch15_cpu2_irq | HPDMA2_ch15_cpu2_irq | HPDMA3_ch15_cpu2_irq | SAI4_irq | |
| HEBS = 1 | 0 | EXTI2_EXTI0_irq | PWRCTL_wkup1_irq | TIM1_brk_irq | I2C1_glb_irq |
| 1 | EXTI2_EXTI1_irq | PWRCTL_wkup2_irq | TIM1_cc_irq | I2C2_glb_irq | |
| 2 | EXTI2_EXTI2_irq | PWRCTL_wkup3_irq | TIM1_trg_irq | I2C3_glb_irq | |
| 3 | EXTI2_EXTI3_irq | PWRCTL_wkup4_irq | TIM1_upd_irq | - | |
| 4 | EXTI2_EXTI4_irq | PWRCTL_wkup5_irq | TIM2_irq | - | |
| 5 | EXTI2_EXTI5_irq | PWRCTL_wkup6_irq | TIM3_irq | - | |
| 6 | EXTI2_EXTI6_irq | - | TIM4_irq | - | |
| 7 | EXTI2_EXTI7_irq | ADC1_irq | TIM5_gbl_irq | - | |
| 8 | EXTI2_EXTI8_irq | ADC2_irq | TIM6_gbl_irq | I3C1_glb_irq | |
| 9 | EXTI2_EXTI9_irq | - | TIM7_gbl_irq | I3C2_glb_irq | |
| 10 | EXTI2_EXTI10_irq | - | TIM8_brk_irq | I3C3_glb_irq | |
| 11 | EXTI2_EXTI11_irq | FMC_glb_irq | TIM8_cc_irq | - | |
| 12 | EXTI2_EXTI12_irq | OTFDEC1_irq | TIM8_trg_irq | - | |
| 13 | EXTI2_EXTI13_irq | - | TIM8_upd_irq | SPDIF_RX_irq | |
| 14 | EXTI2_EXTI14_irq | - | TIM10_gbl_irq | SDMMC1_irq | |
| 15 | EXTI2_EXTI15_irq | OCTOSPI1_irq | TIM11_gbl_irq | SDMMC2_irq | |
| 16 | EXTI1_EXTI0_irq | - | TIM12_gbl_irq | SDMMC3_irq |
Table 920. Hardware event mapping 0 to 3 (continued)
| Bank | Event | EXTMUX(7:0) = 0 | EXTMUX(7:0) = 1 | EXTMUX(7:0) = 2 | EXTMUX(7:0) = 3 |
|---|---|---|---|---|---|
| HEBS = 1 | 17 | EXTI1_EXTI1_irq | FDCAN_cal_irq | TIM13_gbl_irq | - |
| 18 | EXTI1_EXTI2_irq | FDCAN1_intr0_irq | TIM14_gbl_irq | - | |
| 19 | EXTI1_EXTI3_irq | FDCAN1_intr1_irq | TIM15_gbl_irq | - | |
| 20 | EXTI1_EXTI4_irq | FDCAN2_intr0_irq | TIM16_gbl_irq | - | |
| 21 | EXTI1_EXTI5_irq | FDCAN2_intr1_irq | TIM17_gbl_irq | - | |
| 22 | EXTI1_EXTI6_irq | FDCAN3_intr0_irq | - | - | |
| 23 | EXTI1_EXTI7_irq | FDCAN3_intr1_irq | - | - | |
| 24 | EXTI1_EXTI8_irq | - | - | EXTI_wwdg1_wkup | |
| 25 | EXTI1_EXTI9_irq | FPU_irq | - | IWDG1_ew_irq | |
| 26 | EXTI1_EXTI10_irq | - | - | IWDG2_ew_irq | |
| 27 | EXTI1_EXTI11_irq | - | - | IWDG3_ew_irq | |
| 28 | EXTI1_EXTI12_irq | LTDC_cpu1_I01_irq | - | IWDG4_ew_irq | |
| 29 | EXTI1_EXTI13_irq | LTDC_cpu1_I01_err_irq | - | - | |
| 30 | EXTI1_EXTI14_irq | LTDC_cpu1_I2_irq | - | WWDG1_ew_irq | |
| 31 | EXTI1_EXTI15_irq | LTDC_cpu1_I2_err_irq | - | - |
Table 921. Hardware event mapping 4 to 7
| Bank | Event | EXTMUX(7:0) = 4 | EXTMUX(7:0) = 5 | EXTMUX(7:0) = 6 | EXTMUX(7:0) = 7 |
|---|---|---|---|---|---|
| HEBS = 0 | 0 | HWEVENTA - | LTDC_cpu2_I01_irq | MDF1_FLT0_irq | USART1_irq |
| 1 | HWEVENTA - | LTDC_cpu2_I01_err_irq | MDF1_FLT1_irq | USART2_irq | |
| 2 | HWEVENTB - | LTDC_cpu2_I2_irq | MDF1_FLT2_irq | USART3_irq | |
| 3 | HWEVENTB - | LTDC_cpu2_I2_err_irq | MDF1_FLT3_irq | UART4_irq | |
| 4 | - | - | MDF1_FLT4_irq | UART5_irq | |
| 5 | cpu2_sysreset_irq | DCMIPP_glb_irq | MDF1_FLT5_irq | USART6_irq | |
| 6 | - | - | MDF1_FLT6_irq | UART7_irq | |
| 7 | - | - | MDF1_FLT7_irq | - | |
| 8 | TEMP_irq | - | - | - | |
| 9 | RETRAMcrc_err_irq | CSIhost_irq | - | LPUART1_irq | |
| 10 | - | CCI_irq | IPCC1_rx0_cpu1_irq | - | |
| 11 | CRYP1_irq | - | IPCC1_rx0_cpu1_s_irq | USART1_RX_sreq | |
| 12 | CRYP2_irq | ETH1_lpi_irq | IPCC1_tx0_cpu1_irq | USART1_TX_sreq | |
| 13 | SAES_irq | ETH1_pmt_irq | IPCC1_tx0_cpu1_s_irq | USART2_RX_sreq | |
| 14 | HASH_irq | ETH1_sbd_irq | - | USART2_TX_sreq |
Table 921. Hardware event mapping 4 to 7 (continued)
| Bank | Event | EXTMUX(7:0) = 4 | EXTMUX(7:0) = 5 | EXTMUX(7:0) = 6 | EXTMUX(7:0) = 7 |
|---|---|---|---|---|---|
| HEBS = 0 | 15 | PKA_irq | ETH2_lpi_irq | - | USART3_RX_sreq |
| 16 | RNG_irq | ETH2_pmt_irq | - | USART3_TX_sreq | |
| 17 | TAMP_cpu1_s_wkup | ETH2_sbd_irq | - | UART4_RX_sreq | |
| 18 | TAMP_cpu1_wkup | - | IPCC1_rx1_cpu2_irq | UART4_TX_sreq | |
| 19 | TAMP_cpu2_s_wkup | ETHSW_fsc_irq | IPCC1_rx1_cpu2_s_irq | UART5_RX_sreq | |
| 20 | TAMP_cpu2_wkup | ETHSW_msg_buf_irq | IPCC1_tx1_cpu2_irq | UART5_TX_sreq | |
| 21 | - | ETHSW_combined_irq | IPCC1_tx1_cpu2_s_irq | USART6_RX_sreq | |
| 22 | - | - | - | USART6_TX_sreq | |
| 23 | IAC_cpu1_irq | - | - | UART7_RX_sreq | |
| 24 | IAC_cpu2_irq | - | - | UART7_TX_sreq | |
| 25 | - | - | - | - | |
| 26 | RTC_cpu1_wkup | rcc_hsifmon_cpu1_irq | - | - | |
| 27 | RTC_cpu1_s_wkup | rcc_hsifmon_cpu2_irq | - | - | |
| 28 | RTC_cpu2_wkup | - | ddrphy_irq | - | |
| 29 | RTC_cpu2_s_wkup | TIM8_CH1_sreq | ddrperfm_irq | LPUART1_RX_sreq | |
| 30 | - | TIM8_CH2_sreq | umctl2_irq | LPUART1_TX_sreq | |
| 31 | - | - | - | - | |
| HEBS = 1 | 0 | TIM1_CH1_sreq | TIM8_CH3_sreq | dfi_error_irq | SPI1_RX_sreq |
| 1 | TIM1_CH2_sreq | TIM8_CH4_sreq | SERF_irq | SPI1_TX_sreq | |
| 2 | TIM1_CH3_sreq | TIM8_UP_sreq | - | SPI2_RX_sreq | |
| 3 | TIM1_CH4_sreq | TIM8_TRIG_sreq | I2C1_EVC_sreq | SPI2_TX_sreq | |
| 4 | TIM1_TRIG_sreq | TIM8_COM_sreq | I2C2_EVC_sreq | SPI3_RX_sreq | |
| 5 | TIM1_UP_sreq | TIM15_CH1_sreq | I2C3_EVC_sreq | SPI3_TX_sreq | |
| 6 | TIM1_COM_sreq | TIM15_UP_sreq | - | SPI4_RX_sreq | |
| 7 | TIM2_CH1_sreq | TIM15_TRIG_sreq | - | SPI4_TX_sreq | |
| 8 | TIM2_CH2_sreq | TIM15_COM_sreq | - | SPI5_RX_sreq | |
| 9 | TIM2_CH3_sreq | TIM16_CH1_sreq | - | SPI5_TX_sreq | |
| 10 | TIM2_CH4_sreq | TIM16_UP_sreq | - | SPI6_RX_sreq | |
| 11 | TIM2_UP_sreq | TIM17_CH1_sreq | I2C1_RX_sreq | SPI6_TX_sreq | |
| 12 | TIM3_CH1_sreq | TIM17_UP_sreq | I2C1_TX_sreq | SPI7_RX_sreq | |
| 13 | TIM3_CH2_sreq | - | I2C2_RX_sreq | SPI7_TX_sreq | |
| 14 | TIM3_CH3_sreq | - | I2C2_TX_sreq | - | |
| 15 | TIM3_CH4_sreq | - | I2C3_RX_sreq | - | |
| 16 | TIM3_UP_sreq | - | I2C3_TX_sreq | - |
Table 921. Hardware event mapping 4 to 7 (continued)
| Bank | Event | EXTMUX(7:0) = 4 | EXTMUX(7:0) = 5 | EXTMUX(7:0) = 6 | EXTMUX(7:0) = 7 |
|---|---|---|---|---|---|
| HEBS = 1 | 17 | TIM3_TRIG_sreq | - | - | SAI1_A_sreq |
| 18 | TIM4_CH1_sreq | - | - | SAI1_B_sreq | |
| 19 | TIM4_CH2_sreq | - | - | SAI2_A_sreq | |
| 20 | TIM4_CH3_sreq | LPTIMER1_IC1_sreq | - | SAI2_B_sreq | |
| 21 | TIM4_CH4_sreq | LPTIMER1_IC2_sreq | - | SAI3_A_sreq | |
| 22 | TIM4_UP_sreq | LPTIMER1_UE_sreq | - | SAI3_B_sreq | |
| 23 | TIM5_CH1_sreq | LPTIMER2_IC1_sreq | - | SAI4_A_sreq | |
| 24 | TIM5_CH2_sreq | LPTIMER2_IC2_sreq | - | SAI4_B_sreq | |
| 25 | TIM5_CH3_sreq | LPTIMER2_UE_sreq | - | - | |
| 26 | TIM5_CH4_sreq | LPTIMER3_IC1_sreq | - | DCMI_sreq | |
| 27 | TIM5_UP_sreq | LPTIMER3_UE_sreq | - | - | |
| 28 | TIM5_TRIG_sreq | LPTIMER4_IC1_sreq | ADC1_sreq | - | |
| 29 | TIM6_UP_sreq | LPTIMER4_UE_sreq | ADC2_sreq | - | |
| 30 | TIM7_UP_sreq | LPTIMER5_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
| Bank | Event | EXTMUX(7:0) = 8 | EXTMUX(7:0) = 9 |
|---|---|---|---|
| HEBS = 0 | 0 | FMC_TXRX_sreq | EXTI_iwdg1_wkup |
| 1 | FMC_BCH_sreq | EXTI_iwdg2_wkup | |
| 2 | - | EXTI_iwdg3_wkup | |
| 3 | OCTOSPI1_sreq | EXTI_iwdg4_wkup | |
| 4 | - | - | |
| 5 | SPDIF_RX_DT_sreq | EXTI_pwr_pvd_wkup | |
| 6 | SPDIF_RX_CS_sreq | EXTI_cpu1_sev_irq | |
| 7 | - | EXTI_cpu2_sev_irq | |
| 8 | MDF1_FLT0_sreq | - | |
| 9 | MDF1_FLT1_sreq | - | |
| 10 | MDF1_FLT2_sreq | RCC_cpu1_wkup_irq | |
| 11 | MDF1_FLT3_sreq | RCC_cpu2_wkup_irq | |
| 12 | MDF1_FLT4_sreq | RCC_cpu1_irq | |
| 13 | MDF1_FLT5_sreq | RCC_cpu2_irq |
Table 922. Hardware event mapping 8 to 9 (continued)
| Bank | Event | EXTMUX(7:0) = 8 | EXTMUX(7:0) = 9 |
|---|---|---|---|
| HEBS = 0 | 14 | MDF1_FLT6_sreq | RAMCFG_irq |
| 15 | MDF1_FLT7_sreq | - | |
| 16 | - | - | |
| 17 | - | - | |
| 18 | CRYP1_IN_sreq | - | |
| 19 | CRYP1_OUT_sreq | - | |
| 20 | CRYP2_IN_sreq | - | |
| 21 | CRYP2_OUT_sreq | - | |
| 22 | HASH2_IN_sreq | - | |
| 23 | SAES_IN_sreq | - | |
| 24 | SAES_OUT_sreq | - | |
| 25 | - | - | |
| 26 | - | - | |
| 27 | USBH_ohci_irq | - | |
| 28 | USBH_ehci_irq | - | |
| 29 | - | - | |
| 30 | - | - | |
| 31 | - | - | |
| HEBS = 1 | 0 | SYS_DS_EXIT | RNG2_irq |
| 1 | CPU1_DS_EXIT | HASH2_irq | |
| 2 | CPU2_DS_EXIT | EXTI_usbh_cpu2_wkup | |
| 3 | PWRDS_CPU1 | otg_hs_glb_irq | |
| 4 | PWRDS_CPU2 | DENABLE_A35_error | |
| 5 | PWRDS_SYS | DENABLE_M33_error | |
| 6 | C1_STBY_EXIT | DENABLE_DAP_error | |
| 7 | C2_STBY_EXIT | - | |
| 8 | AWU_WAKE_CPU2_V33 | - | |
| 9 | AWU_WAKE_CPU1_V33 | - | |
| 10 | PWRWAKE_CPU1 | - | |
| 11 | PWRWAKE_CPU2 | - | |
| 12 | PWRWAKE_SYS | - | |
| 13 | - | - |
Table 922. Hardware event mapping 8 to 9 (continued)
| Bank | Event | EXTMUX(7:0) = 8 | EXTMUX(7:0) = 9 |
|---|---|---|---|
| HEBS = 1 | 14 | cpu1_c0_standbywfi | - |
| 15 | - | - | |
| 16 | cpu1_standbywfi_l2 | - | |
| 17 | cpu2_sleeping | - | |
| 18 | cpu2_sleepdeep | - | |
| 19 | - | - | |
| 20 | - | - | |
| 21 | - | - | |
| 22 | exti_pwr_pvm_wkup | - | |
| 23 | exti_usbh_wkup | - | |
| 24 | exti_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:
- • Maintain the clock and power to the processors when in low-power modes.
- • Maintain the clock and power to the system debug and trace components when in low-power modes.
- • Stop the clock to certain peripherals (CAN, SMBUS timeout, watchdogs, timers, RTC, DMAs) when a processor is stopped in debug mode.
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:
- • all DMA engines (HPDMAx)
- • all timers (TIMx, LPTIMx)
- • all I2C peripherals (to prevent SMBus timeout)
- • FDCAN
- • all watchdog timers (WWDGx, IWDGx)
- • RTC
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:
- • When SPIDEN = 1 (secure privilege debug enabled), all bits can be modified by a secure access (PPROT[1] = 0). Only bits corresponding to nonsecure peripherals (or DMA channels) can be modified by a nonsecure access (PPROT[1] = 1). All bits can be read by both nonsecure or secure accesses.
- When SPIDEN = 0 (secure privilege debug disabled), both secure and nonsecure accesses are possible. Only bits corresponding to nonsecure peripherals (or DMA channels) can be modified. All bits can be read.
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
| Inputs | IWDG1 frozen? | ||
|---|---|---|---|
| IWDG1(1) | SPIDEN | DEBUGACK (Cortex-A35 core0) | |
| 0 | X | X | No |
| 1 | 0 | 0 | No |
| 1 | 0 | 1 | Yes |
| 1 | 1 | 0 | No |
| 1 | 1 | 1 | Yes |
| 1 | 1 | 0 | No |
| 1 | 1 | 1 | Yes |
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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| REV_ID[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | DEV_ID[11:0] | |||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | ||||
Example 0x2000 = revision 2.0
Bits 15:12 Reserved, must be kept at reset value.
Bits 11:0 DEV_ID[11:0] : Device identifier0x0503: STM32MP21X
DBGMCU configuration register (DBGMCU_CR)
Address offset: 0x004
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBG_S TANDB Y | DBG_S TOP | DBG_S LEEP |
| rw | rw | rs |
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 mode0: 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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBG_STGEN_STOP | Res. |
| 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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
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)
- 0: Normal operation. HPDMA1_CHn continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. HPDMA1_CHn is suspended while Cortex-A35 is in debug mode.
DBGMCU AHB2 - highest part- peripheral freeze register CPU1
(DBGMCU_AHB2HFZ1)
Address offset: 0x014
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
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)
- 0: Normal operation. HPDMA3_CHn continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. HPDMA3_CHn is suspended while Cortex-A35 is in debug mode.
DBGMCU AHB2 - lowest part - peripheral freeze register CPU2
(DBGMCU_AHB2LFZ2)
Address offset: 0x018
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
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-M33 is in debug mode.
- 1: Stop in debug. HPDMA2_CHn is suspended while Cortex-M33 is in debug mode.
Bits 15:0 DBG_HPDMA1_CHn_STOP: HPDMA1_CHn suspend in debug (n = 15 to 0)
- 0: Normal operation. HPDMA1_CHn continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. HPDMA1_CHn is suspended while Cortex-M33 is in debug mode.
DBGMCU AHB2 - highest part- peripheral freeze register CPU2
(DBGMCU_AHB2HFZ2)
Address offset: 0x01C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rw | rw | rw | rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
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)
- 0: Normal operation. HPDMA3_CHn continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. HPDMA3_CHn is suspended while Cortex-M33 is in debug mode.
DBGMCU APB1 peripheral freeze register CPU1 (DBGMCU_APB1FZ1)
Address offset: 0x02C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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. |
| rw | rw | rw | rw | rw | rw | ||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
Bits 31:30 Reserved, must be kept at reset value.
Bit 29 DBG_TIM11_STOP: TIM11 stop in debug
- 0: Normal operation. TIM11 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM11 is frozen while Cortex-A35 is in debug mode.
Bit 28 DBG_TIM10_STOP: TIM10 stop in debug
- 0: Normal operation. TIM10 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM10 is frozen while Cortex-A35 is in debug mode.
- Bit 27 Reserved, must be kept at reset value.
- Bit 26 DBG_I3C2_STOP: I3C2 SMBUS timeout stop in debug
0: Normal operation. I3C2 SMBUS timeout continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. I3C2 SMBUS timeout is frozen while Cortex-A35 is in debug mode. - Bit 25 DBG_I3C1_STOP: I3C1 SMBUS timeout stop in debug
0: Normal operation. I3C1 SMBUS timeout continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. I3C1 SMBUS timeout is frozen while Cortex-A35 is in debug mode. - Bit 24 DBG_I2C2_STOP: I2C2 SMBUS timeout stop in debug
0: Normal operation. I2C2 SMBUS timeout continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. I2C2 SMBUS timeout is frozen while Cortex-A35 is in debug mode. - Bit 23 DBG_I2C1_STOP: I2C1 SMBUS timeout stop in debug
0: Normal operation. I2C1 SMBUS timeout continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. I2C1 SMBUS timeout is frozen while Cortex-A35 is in debug mode. - Bits 22:11 Reserved, must be kept at reset value.
- Bit 10 DBG_LPTIM2_STOP: LPTIM2 stop in debug
0: Normal operation. LPTIM2 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. LPTIM2 is frozen while Cortex-A35 is in debug mode. - Bit 9 DBG_LPTIM1_STOP: LPTIM1 stop in debug
0: Normal operation. LPTIM1 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. LPTIM1 is frozen while Cortex-A35 is in debug mode. - Bit 8 DBG_TIM14_STOP: TIM14 stop in debug
0: Normal operation. TIM14 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM14 is frozen while Cortex-A35 is in debug mode. - Bit 7 DBG_TIM13_STOP: TIM13 stop in debug
0: Normal operation. TIM13 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM13 is frozen while Cortex-A35 is in debug mode. - Bit 6 DBG_TIM12_STOP: TIM12 stop in debug
0: Normal operation. TIM12 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM12 is frozen while Cortex-A35 is in debug mode. - Bit 5 DBG_TIM7_STOP: TIM7 stop in debug
0: Normal operation. TIM7 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM7 is frozen while Cortex-A35 is in debug mode. - Bit 4 DBG_TIM6_STOP: TIM6 stop in debug
0: Normal operation. TIM6 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM6 is frozen while Cortex-A35 is in debug mode. - Bit 3 DBG_TIM5_STOP: TIM5 stop in debug
0: Normal operation. TIM5 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM5 is frozen while Cortex-A35 is in debug mode. - Bit 2 DBG_TIM4_STOP: TIM4 stop in debug
0: Normal operation. TIM4 continues to operate while Cortex-A35 is in debug mode.
1: Stop in debug. TIM4 is frozen while Cortex-A35 is in debug mode.
Bit 1 DBG_TIM3_STOP: TIM3 stop in debug
- 0: Normal operation. TIM3 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM3 is frozen while Cortex-A35 is in debug mode.
Bit 0 DBG_TIM2_STOP: TIM2 stop in debug
- 0: Normal operation. TIM2 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM2 is frozen while Cortex-A35 is in debug mode.
DBGMCU APB1 peripheral freeze register CPU2 (DBGMCU_APB1FZ2)
Address offset: 0x030
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | DBG_TIM11_STOP | DBG_TIM10_STOP | Res. | DBG_I3C2_STOP | DBG_I3C1_STOP | DBG_I2C2_STOP | DBG_I2C1_STOP | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| rw | rw | rw | rw | rw | rw | ||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | DBG_LPTIM2_STOP | DBG_LPTIM1_STOP | DBG_TIM14_STOP | DBG_TIM13_STOP | DBG_TIM12_STOP | DBG_TIM7_STOP | DBG_TIM6_STOP | DBG_TIM5_STOP | DBG_TIM4_STOP | DBG_TIM3_STOP | DBG_TIM2_STOP |
| rw | rw | rs | rw | rw | rw | rw | rw | rw | rw | rs |
Bits 31:30 Reserved, must be kept at reset value.
Bit 29 DBG_TIM11_STOP: TIM11 stop in debug
- 0: Normal operation. TIM11 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM11 is frozen while Cortex-M33 is in debug mode.
Bit 28 DBG_TIM10_STOP: TIM10 stop in debug
- 0: Normal operation. TIM10 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM10 is frozen while Cortex-M33 is in debug mode.
Bit 27 Reserved, must be kept at reset value.
Bit 26 DBG_I3C2_STOP: I3C2 SMBUS timeout stop in debug
- 0: Normal operation. I3C2 SMBUS timeout continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I3C2 SMBUS timeout is frozen while Cortex-M33 is in debug mode.
Bit 25 DBG_I3C1_STOP: I3C1 SMBUS timeout stop in debug
- 0: Normal operation. I3C1 SMBUS timeout continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I3C1 SMBUS timeout is frozen while Cortex-M33 is in debug mode.
Bit 24 DBG_I2C2_STOP: I2C2 SMBUS timeout stop in debug
- 0: Normal operation. I2C2 SMBUS timeout continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I2C2 SMBUS timeout is frozen while Cortex-M33 is in debug mode.
Bit 23 DBG_I2C1_STOP: I2C1 SMBUS timeout stop in debug
- 0: Normal operation. I2C1 SMBUS timeout continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I2C1 SMBUS timeout is frozen while Cortex-M33 is in debug mode.
Bits 22:11 Reserved, must be kept at reset value.
- Bit 10 DBG_LPTIM2_STOP: LPTIM2 stop in debug
0: Normal operation. LPTIM2 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. LPTIM2 is frozen while Cortex-M33 is in debug mode. - Bit 9 DBG_LPTIM1_STOP: LPTIM1 stop in debug
0: Normal operation. LPTIM1 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. LPTIM1 is frozen while Cortex-M33 is in debug mode. - Bit 8 DBG_TIM14_STOP: TIM14 stop in debug
0: Normal operation. TIM14 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM14 is frozen while Cortex-M33 is in debug mode. - Bit 7 DBG_TIM13_STOP: TIM13 stop in debug
0: Normal operation. TIM13 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM13 is frozen while Cortex-M33 is in debug mode. - Bit 6 DBG_TIM12_STOP: TIM12 stop in debug
0: Normal operation. TIM12 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM12 is frozen while Cortex-M33 is in debug mode. - Bit 5 DBG_TIM7_STOP: TIM7 stop in debug
0: Normal operation. TIM7 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM7 is frozen while Cortex-M33 is in debug mode. - Bit 4 DBG_TIM6_STOP: TIM6 stop in debug
0: Normal operation. TIM6 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM6 is frozen while Cortex-M33 is in debug mode. - Bit 3 DBG_TIM5_STOP: TIM5 stop in debug
0: Normal operation. TIM5 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM5 is frozen while Cortex-M33 is in debug mode. - Bit 2 DBG_TIM4_STOP: TIM4 stop in debug
0: Normal operation. TIM4 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM4 is frozen while Cortex-M33 is in debug mode. - Bit 1 DBG_TIM3_STOP: TIM3 stop in debug
0: Normal operation. TIM3 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM3 is frozen while Cortex-M33 is in debug mode. - Bit 0 DBG_TIM2_STOP: TIM2 stop in debug
0: Normal operation. TIM2 continues to operate while Cortex-M33 is in debug mode.
1: Stop in debug. TIM2 is frozen while Cortex-M33 is in debug mode.
DBGMCU APB2 peripheral freeze register CPU1 (DBGMCU_APB2FZ1)
Address offset: 0x034
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | DBG_FDCAN_STOP | Res. | Res. | Res. | Res. | Res. | DBG_TIM17_STOP | DBG_TIM16_STOP | DBG_TIM15_STOP | Res. | Res. | Res. | DBG_TIM8_STOP | DBG_TIM1_STOP |
| rw | rw | rw | rw | rw | rs |
Bits 31:14 Reserved, must be kept at reset value.
Bit 13 DBG_FDCAN_STOP: FDCAN stop in debug- 0: Normal operation. FDCAN continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. FDCAN is frozen while Cortex-A35 is in debug mode.
Bits 12:8 Reserved, must be kept at reset value.
Bit 7 DBG_TIM17_STOP: TIM17 stop in debug- 0: Normal operation. TIM17 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM17 is frozen while Cortex-A35 is in debug mode.
- 0: Normal operation. TIM16 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM16 is frozen while Cortex-A35 is in debug mode.
- 0: Normal operation. TIM15 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM15 is frozen while Cortex-A35 is in debug mode.
Bits 4:2 Reserved, must be kept at reset value.
Bit 1 DBG_TIM8_STOP: TIM8 stop in debug- 0: Normal operation. TIM8 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM8 is frozen while Cortex-A35 is in debug mode.
- 0: Normal operation. TIM1 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. TIM1 is frozen while Cortex-A35 is in debug mode.
DBGMCU APB2 peripheral freeze register CPU2 (DBGMCU_APB2FZ2)
Address offset: 0x038
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 |
| rw | rw | rw | rw | rw | rs |
Bits 31:14 Reserved, must be kept at reset value.
Bit 13 DBG_FDCAN_STOP: FDCAN stop in debug
- 0: Normal operation. FDCAN continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. FDCAN is frozen while Cortex-M33 is in debug mode.
Bits 12:8 Reserved, must be kept at reset value.
Bit 7 DBG_TIM17_STOP: TIM17 stop in debug
- 0: Normal operation. TIM17 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM17 is frozen while Cortex-M33 is in debug mode.
Bit 6 DBG_TIM16_STOP: TIM16 stop in debug
- 0: Normal operation. TIM16 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM16 is frozen while Cortex-M33 is in debug mode.
Bit 5 DBG_TIM15_STOP: TIM15 stop in debug
- 0: Normal operation. TIM15 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM15 is frozen while Cortex-M33 is in debug mode.
Bits 4:2 Reserved, must be kept at reset value.
Bit 1 DBG_TIM8_STOP: TIM8 stop in debug
- 0: Normal operation. TIM8 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM8 is frozen while Cortex-M33 is in debug mode.
Bit 0 DBG_TIM1_STOP: TIM1 stop in debug
- 0: Normal operation. TIM1 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. TIM1 is frozen while Cortex-M33 is in debug mode.

DBGMCU APB3 peripheral freeze register CPU1 (DBGMCU_APB3FZ1)
Address offset: 0x03C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBG_WWDG1_STOP | Res. | Res. | DBG_IWDG2_STOP | DBG_IWDG1_STOP | Res. |
| rw | rw | rw |
Bits 31:6 Reserved, must be kept at reset value.
Bit 5 DBG_WWDG1_STOP: WWDG1 stop in debug0: 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 debug0: 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 debug0: 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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBG_WWDG1_STOP | DBG_IWDG4_STOP | DBG_IWDG3_STOP | Res. | Res. | Res. |
| rw | rw | rw |
Bits 31:6 Reserved, must be kept at reset value.
Bit 5 DBG_WWDG1_STOP: WWDG1 stop in debug0: 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
- 0: Normal operation. Watchdog continues to count while Cortex-M33 is in debug mode.
- 1: Stop in debug. Watchdog is frozen while Cortex-M33 is in debug mode.
Bit 3 DBG_IWDG3_STOP: IWDG3 stop in debug
- 0: Normal operation. Watchdog continues to count while Cortex-M33 is in debug mode.
- 1: Stop in debug. Watchdog is frozen while Cortex-M33 is in debug mode.
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 31 | Bit 30 | Bit 29 | Bit 28 | Bit 27 | Bit 26 | Bit 25 | Bit 24 | Bit 23 | Bit 22 | Bit 21 | Bit 20 | Bit 19 | Bit 18 | Bit 17 | Bit 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DBG_I | DBG_L | DBG_L | DBG_I | DBG_R | |||||||||||
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | 3C3_S | Res. | PTIM4_ | PTIM3_ | 2C3_S | Res. | Res. | Res. | TC_ST |
| TOP | STOP | STOP | TOP | OP | |||||||||||
| rw | rw | rw | rw | rs | |||||||||||
| Bit 8 | DBG_I3C3_STOP | : I3C3 stop in debug | |||||||||||||
| 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 | |||||||||||||
| Bit 0 | DBG_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
- 0: Normal operation. I3C3 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. I3C3 is frozen while Cortex-A35 is in debug mode.
Bit 7 Reserved, must be kept at reset value.
Bit 6 DBG_LPTIM4_STOP: LPTIM4 stop in debug
- 0: Normal operation. LPTIM4 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. LPTIM4 is frozen while Cortex-A35 is in debug mode.
Bit 5 DBG_LPTIM3_STOP: LPTIM3 stop in debug
- 0: Normal operation. LPTIM3 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. LPTIM3 is frozen while Cortex-A35 is in debug mode.
Bit 4 DBG_I2C3_STOP: I2C3 stop in debug
- 0: Normal operation. I2C3 continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. I2C3 is frozen while Cortex-A35 is in debug mode.
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 DBG_RTC_STOP: RTC clock is suspended in debug
- 0: Normal operation. RTC clock continues to operate while Cortex-A35 is in debug mode.
- 1: Stop in debug. RTC clock is suspended while Cortex-A35 is in debug mode.
DBGMCU APBSR peripheral freeze register CPU2 (DBGMCU_APBSRFZ2)
Address offset: 0x048
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBG_I3C3_STOP | Res. | DBG_LPTIM4_STOP | DBG_LPTIM3_STOP | DBG_I2C3_STOP | Res. | Res. | Res. | DBG_RTC_STOP |
| rw | rw | rw | rw | rs |
Bits 31:9 Reserved, must be kept at reset value.
Bit 8 DBG_I3C3_STOP: I3C3 stop in debug- 0: Normal operation. I3C3 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I3C3 is frozen while Cortex-M33 is in debug mode.
Bit 7 Reserved, must be kept at reset value.
Bit 6 DBG_LPTIM4_STOP: LPTIM4 stop in debug- 0: Normal operation. LPTIM4 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. LPTIM4 is frozen while Cortex-M33 is in debug mode.
- 0: Normal operation. LPTIM3 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. LPTIM3 is frozen while Cortex-M33 is in debug mode.
- 0: Normal operation. I2C3 continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. I2C3 is frozen while Cortex-M33 is in debug mode.
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 DBG_RTC_STOP: RTC clock is suspended in debug- 0: Normal operation. RTC clock continues to operate while Cortex-M33 is in debug mode.
- 1: Stop in debug. RTC clock is suspended while Cortex-M33 is in debug mode.
DBGMCU DENABLE value observation (DBGMCU_DENABLE)
Address offset: 0x0F8
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | SPNIDENM | SPIDENM | NIDENM | DBGENM | DBGSWEN | SPNIDENA | SPIDENA | HPDEN | DEVIC EEN | NIDENA | DBG ENA | LPDBG EN |
| r | r | r | r | r | r | r | r | r | r | r | r |
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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MESSAGE[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MESSAGE[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Read/write from debugger; read only from processor
DBGMCU device authentication register (DBGMCU_DBG_AUTH_DEV)
Address offset: 0x104
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| MESSAGE[31:16] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| MESSAGE[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DEVIC E_ACK | HOST_ ACK |
| r | r |
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
| Offset | Register name Reset | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x000 | DBGMCU_IDC | REV_ID[15:0] | Res | Res | Res | Res | DEV_ID[11:0] | ||||||||||||||||||||||||||
| Reset value | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | |||||
| 0x004 | DBGMCU_CR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | ||||||||||||
| Reset value | 0 | 0 | 1 | ||||||||||||||||||||||||||||||
| 0x008 | DBGMCU_CRA35 | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | ||||||||||||
| Reset value | 0 | 0 | 0 | ||||||||||||||||||||||||||||||
| 0x00C | Reserved | Reserved | |||||||||||||||||||||||||||||||
| 0x010 | DBGMCU_AHB2LFZ1 | DBG_HPDMA2_CH15_STOP | DBG_HPDMA2_CH14_STOP | DBG_HPDMA2_CH13_STOP | DBG_HPDMA2_CH12_STOP | DBG_HPDMA2_CH11_STOP | DBG_HPDMA2_CH10_STOP | DBG_HPDMA2_CH9_STOP | DBG_HPDMA2_CH8_STOP | DBG_HPDMA2_CH7_STOP | DBG_HPDMA2_CH6_STOP | DBG_HPDMA2_CH5_STOP | DBG_HPDMA2_CH4_STOP | DBG_HPDMA2_CH3_STOP | DBG_HPDMA2_CH2_STOP | DBG_HPDMA2_CH1_STOP | DBG_HPDMA2_CH0_STOP | DBG_HPDMA1_CH15_STOP | DBG_HPDMA1_CH14_STOP | DBG_HPDMA1_CH13_STOP | DBG_HPDMA1_CH12_STOP | DBG_HPDMA1_CH11_STOP | DBG_HPDMA1_CH10_STOP | DBG_HPDMA1_CH9_STOP | DBG_HPDMA1_CH8_STOP | DBG_HPDMA1_CH7_STOP | DBG_HPDMA1_CH6_STOP | DBG_HPDMA1_CH5_STOP | DBG_HPDMA1_CH4_STOP | DBG_HPDMA1_CH3_STOP | DBG_HPDMA1_CH2_STOP | DBG_HPDMA1_CH1_STOP | DBG_HPDMA1_CH0_STOP |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0x014 | DBGMCU_AHB2HFZ1 | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DBG_HPDMA3_CH15_STOP | DBG_HPDMA3_CH14_STOP | DBG_HPDMA3_CH13_STOP | DBG_HPDMA3_CH12_STOP | DBG_HPDMA3_CH11_STOP | DBG_HPDMA3_CH10_STOP | DBG_HPDMA3_CH9_STOP | DBG_HPDMA3_CH8_STOP | DBG_HPDMA3_CH7_STOP | DBG_HPDMA3_CH6_STOP | DBG_HPDMA3_CH5_STOP | DBG_HPDMA3_CH4_STOP | DBG_HPDMA3_CH3_STOP | DBG_HPDMA3_CH2_STOP | DBG_HPDMA3_CH1_STOP | DBG_HPDMA3_CH0_STOP |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||
| 0x018 | DBGMCU_AHB2LFZ2 | DBG_HPDMA2_CH15_STOP | DBG_HPDMA2_CH14_STOP | DBG_HPDMA2_CH13_STOP | DBG_HPDMA2_CH12_STOP | DBG_HPDMA2_CH11_STOP | DBG_HPDMA2_CH10_STOP | DBG_HPDMA2_CH9_STOP | DBG_HPDMA2_CH8_STOP | DBG_HPDMA2_CH7_STOP | DBG_HPDMA2_CH6_STOP | DBG_HPDMA2_CH5_STOP | DBG_HPDMA2_CH4_STOP | DBG_HPDMA2_CH3_STOP | DBG_HPDMA2_CH2_STOP | DBG_HPDMA2_CH1_STOP | DBG_HPDMA2_CH0_STOP | DBG_HPDMA1_CH15_STOP | DBG_HPDMA1_CH14_STOP | DBG_HPDMA1_CH13_STOP | DBG_HPDMA1_CH12_STOP | DBG_HPDMA1_CH11_STOP | DBG_HPDMA1_CH10_STOP | DBG_HPDMA1_CH9_STOP | DBG_HPDMA1_CH8_STOP | DBG_HPDMA1_CH7_STOP | DBG_HPDMA1_CH6_STOP | DBG_HPDMA1_CH5_STOP | DBG_HPDMA1_CH4_STOP | DBG_HPDMA1_CH3_STOP | DBG_HPDMA1_CH2_STOP | DBG_HPDMA1_CH1_STOP | DBG_HPDMA1_CH0_STOP |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
Table 924. DBGMCU register map and reset values (continued)
| Offset | Register name Reset | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x01C | DBGMCU_AHB2HFZ2 | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | DBG_HPDMA3_CH15_STOP | 0 | DBG_HPDMA3_CH14_STOP | 0 | DBG_HPDMA3_CH13_STOP | 0 | DBG_HPDMA3_CH12_STOP | 0 | DBG_HPDMA3_CH11_STOP | 0 | DBG_HPDMA3_CH10_STOP | 0 | DBG_HPDMA3_CH9_STOP | 0 | DBG_HPDMA3_CH8_STOP | 0 | DBG_HPDMA3_CH7_STOP | 0 | DBG_HPDMA3_CH6_STOP | 0 | DBG_HPDMA3_CH5_STOP | 0 | DBG_HPDMA3_CH4_STOP | 0 | DBG_HPDMA3_CH3_STOP | 0 | DBG_HPDMA3_CH2_STOP | 0 | DBG_HPDMA3_CH1_STOP | 0 | DBG_HPDMA3_CH0_STOP | 0 |
| Reset value | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 0x020 - 0x028 | Reserved | Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| 0x02C | DBGMCU_APB1FZ1 | Res | Res | DBG_TIM11_STOP | DBG_TIM10_STOP | Res | DBG_I3C2_STOP | DBG_I3C1_STOP | DBG_I2C2_STOP | DBG_I2C1_STOP | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DBG_LPTIM2_STOP | DBG_LPTIM1_STOP | DBG_TIM14_STOP | DBG_TIM13_STOP | DBG_TIM12_STOP | DBG_TIM7_STOP | DBG_TIM6_STOP | DBG_TIM5_STOP | DBG_TIM4_STOP | DBG_TIM3_STOP | DBG_TIM2_STOP | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||||
| 0x030 | DBGMCU_APB1FZ2 | Res | Res | DBG_TIM11_STOP | DBG_TIM10_STOP | Res | DBG_I3C2_STOP | DBG_I3C1_STOP | DBG_I2C2_STOP | DBG_I2C1_STOP | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DBG_LPTIM2_STOP | DBG_LPTIM1_STOP | DBG_TIM14_STOP | DBG_TIM13_STOP | DBG_TIM12_STOP | DBG_TIM7_STOP | DBG_TIM6_STOP | DBG_TIM5_STOP | DBG_TIM4_STOP | DBG_TIM3_STOP | DBG_TIM2_STOP | ||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||||
| 0x034 | DBGMCU_APB2FZ1 | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DBG_FDCAN_STOP | 0 | DBG_TIM17_STOP | 0 | DBG_TIM16_STOP | 0 | DBG_TIM15_STOP | 0 | Res | Res | Res | Res | Res | |||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||||||||||||||||
| 0x038 | DBGMCU_APB2FZ2 | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | DBG_FDCAN_STOP | 0 | DBG_TIM17_STOP | 0 | DBG_TIM16_STOP | 0 | DBG_TIM15_STOP | 0 | Res | Res | Res | Res | Res | |||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||||||||||||||||
| 0x03C | DBGMCU_APB3FZ1 | 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_STOP | 0 | Res | Res | Res | DBG_IWDG2_STOP | 0 | DBG_IWDG1_STOP | 0 | Res | |||||||||||||
| Reset value | 0 | 0 | 0 | |||||||||||||||||||||||||||||||||||||||||||||||
Table 924. DBGMCU register map and reset values (continued)
| Offset | Register name Reset | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x040 | DBGMCU_APB3FZ2 | 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. | DBG_WWDG1_STOP | DBG_IWDG4_STOP | DBG_IWDG3_STOP | Res. | Res. | |
| Reset value | ||||||||||||||||||||||||||||||||||
| 0x044 | DBGMCU_APBSRFZ1 | 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_I3C3_STOP | Res. | DBG_LPTIM4_STOP | DBG_LPTIM3_STOP | DBG_I2C3_STOP | Res. | Res. | Res. | DBG_RTC_STOP |
| Reset value | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||
| 0x048 | DBGMCU_APBSRFZ2 | 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_I3C3_STOP | Res. | DBG_LPTIM4_STOP | DBG_LPTIM3_STOP | DBG_I2C3_STOP | Res. | Res. | Res. | DBG_RTC_STOP |
| Reset value | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||
| 0x0F8 | DBGMCU_DENABLE | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBGENM | DBGSWEN | SPIDENA | SPIDENA | HPDEN | DEVICEEN | NIDENA | DBGENA | LPDBGREN |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x100 | DBGMCU_DBG_AUTH_HOST | MESSAGE[31:0] | ||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x104 | DBGMCU_DBG_AUTH_DEV | MESSAGE[31:0] | ||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x108 | DBGMCU_DBG_AUTH_ACK | 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. | Res. | DEVICE_ACK | HOST_ACK | |
| Reset value | 0 | 0 | ||||||||||||||||||||||||||||||||
80.10 Cortex-A35 debug features
The Cortex-A35 subsystem integrates the following CoreSight components (one of each per processor core):
- • Debug unit (DBG)
- • Performance monitoring unit (PMU)
- • Embedded trace macrocell (ETM)
- • Cross trigger interface (CTI)
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:
- • Stop program execution.
- • Examine and alter process and processor states.
- • Examine and alter memory and input/output peripheral states.
- • Restart the processor.
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:
- • cache hit/miss
- • data load/store
- • bus access
- • interrupt exception
- • ETM external trigger output
- • snoop transaction
- • software increment
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:
- • number of instructions executed in the same cycle
- • changes in program flow
- • current processor instruction state
- • addresses of memory locations accessed by load and store instructions
- • type, direction and size of a transfer
- • condition code information
- • exception information
- • wait for interrupt (WFI) state information
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:
- • Cortex-M33 ROM table
- • Cortex-M33 system control space (SCS)
- • Breakpoint Unit (FPB)
- • Data watchpoint and trace unit (DWT)
- • Instrumentation trace macrocell (ITM)
- • Embedded trace macrocell (ETM)
- • Cross trigger interface (CTI)
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 table | Component name | Component base address | Component address offset | Size (Kbytes) | Entry |
|---|---|---|---|---|---|
| 0xE00F F000 | SCS | 0xE000 E000 | 0xFFF0 F000 | 4 | 0xFFF0 F003 |
| 0xE00F F004 | DWT | 0xE000 1000 | 0xFFF0 2000 | 0xFFF0 2003 | |
| 0xE00F F008 | FPB | 0xE000 2000 | 0xFFF0 3000 | 0xFFF0 3003 | |
| 0xE00F F00C | ITM | 0xE000 0000 | 0xFFF0 1000 | 0xFFF0 1003 | |
| 0xE00F F010 | Reserved | 0xE004 0000 | 0xFFF4 1000 | 0xFFF4 1002 | |
| 0xE00F F014 | ETM | 0xE004 1000 | 0xFFF4 2000 | 0xFFF4 2003 | |
| 0xE00F E018 | CTI | 0xE004 2000 | 0xFFF4 3000 | 0xFFF4 3003 | |
| 0xE00F F01C | Reserved | 0xE004 3000 | 0xFFF4 4000 | 0xFFF4 4002 | |
| 0xE00F F020 | Top of table | - | - | - | 0x0000 0000 |
| 0xE00F F024 to 0xE00F FFC8 | Reserved | - | - | - | 0x0000 0000 |
| 0xE00F FFCC to 0xE00F FFFC | ROM 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
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:
- System control space (SCS) @0xE000E000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
- Data watchpoint/trace (DWT) @0xE0001000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
- Breakpoint unit (FPB) @0xE0002000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
- Instrumentation trace (ITM) @0xE0000000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
- Embedded trace (ETM) @0xE0042000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
- Cross trigger (CTI) @0xE0043000: Register file base (0x000), PIDR4 (0xFD0), CIDR3 (0xFFC).
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.
80.11.2 Data watchpoint and trace unit (DWT)
The DWT provides four comparators that can be used as:
- • watchpoint
- • ETM trigger
- • PC sampling trigger
- • data address sampling trigger
- • data comparator (COMP1 only)
- • clock-cycle counter comparator (COMP0 only)
The DWT also contains counters for:
- • clock cycles
- • folded instructions
- • load store unit (LSU) operations
- • sleep cycles
- • number of cycles per instruction
- • interrupt overhead
A DWT comparator compares one of the following with the value in its DWT_COMP register:
- • a data address
- • an instruction address
- • a data value
- • the cycle-count value (for comparator 0 only)
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:
- • one or more DWT data trace packets, containing one or more:
- – address of the instruction that caused a data access
- – address offset, bits[15:0] of the data access address
- – matched data value
- • a watchpoint debug event, on either the PC value or the accessed data address
- • a CMPMATCH[N] event that signals the match outside the DWT.
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:
- • Software trace
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.
- • Hardware trace
The DWT generates trace packets in response to a data trace event, a PC sample, or a performance profiling counter wraparound. The ITM outputs these packets on the trace bus. - • Local timestamping
The ITM contains a 21-bit counter clocked by the (pre-divided) processor clock. The counter value is output in a timestamp packet on the trace bus. The counter is reset to zero every time a timestamp packet is generated. The timestamps thus indicate the time elapsed since the previous timestamp packet. - • Global system timestamping
Timestamps can also be generated using the system-wide 64-bit count value coming from the timestamp generator component.
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:
- • number of instructions executed in the same cycle
- • changes in program flow
- • current processor instruction state
- • addresses of memory locations accessed by load and store instructions
- • type, direction and size of a transfer
- • condition code information
- • exception information
- • wait for interrupt state information
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:
- • Initial message → posted by the host combined with a reset to launch the debug authentication process on the device.
- • Challenge message → the device generates a random value, to be signed by the host, when sending back the response.
- • Response → the host sends a message to the device proving its authenticity.
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:
- • from which TIL the debug opens up,
- • whether full secure or only non-secure debug will be permitted.
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.
- • HOST_ACK: when the host writes a message in DBG_AUTH_HOST register, this bit is set. It indicates that a new message is present in the mailbox. It is reset when the
device reads the register DBG_AUTH_HOST. The device will be polling this bit to know when the host has written a message.
- • DEVICE_ACK: when the device writes a message in DBG_AUTH_DEV register, this bit is set. It is reset when the host reads the register DBG_AUTH_DEV. The host can poll this bit to know when the DEVICE has written a new message.
To support a debug hot plug connection, two interruptions are generated:
- • debugger_auth_write: it detects a debugger write in DBG_AUTH_HOST register (request for debug of debugger that writes a key). The interrupt is cleared with POR reset or CPU read DBG_AUTH_HOST register.
- • debugger_auth_read: it detects a debugger read DBG_AUTH_DEVICE register (debugger read key). The interrupt is cleared when the CPU writes the DBG_AUTH_DEVICE register.
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. IHI 0031C (ID080813) - Arm® debug interface architecture specification ADIv5.0 to ADIv5.2, issue C, 8 Aug 2013.
- 2. DDI 0480F (ID100313) - Arm® CoreSight™ SoC-400 r3p1 technical reference manual, Issue F, 26th Sept 2013
- 3. DDI 0461B (ID010111) - Arm® CoreSight™ trace memory controller r0p1 technical reference manual, Issue B, 10 Dec 2010
- 4. DDI 0314H - Arm® CoreSight™ components technical reference manual, Issue H, 10 July, 2009
- 5. Arm® Cortex®-M33 processor r1p0 technical reference manual, Issue 0100-03, 19 June 2020
- 6. IHI0064F (ID42818) - Arm® embedded trace macrocell architecture specification v4, Issue F, 30 April 2018
- 7. ARM® CoreSight™ ETM-M33, revision: r0p1, technical reference manual, issue 0001-00, 03 February 2017
- 8. DDI 0528B (ID062514) - Arm® CoreSight™ STM system trace macrocell r0p1 technical reference manual, Issue B, 11 March 2014
- 9. Arm® Cortex®-A35 processor r1p0 technical reference manual, issue 0100-00, 28 February 2019