AT32F425
Series Reference Manual
2022.03.30
Page 425
Ver 2.01
23
Debug (DEBUG)
23.1
Debug introduction
Cortex
™
-M4 core provides poweful debugging features including halt and single step support, as well as
trace function that is used for checking the details of the program execution. The debug features are
implemented with a serial wire debug interface.
ARM Cortex
™
-M4 reference documentation:
Cortex™-M4 Technical Reference Manual (TRM)
ARM Debug Interface V5
ARM CoreSight Design Kit revision r1p0 Technical Reference Manual
23.2
Debug and Trace
It is possible to support debugging for different peripherals, and configure the status of peripherals during
debugging. For timers and watchdogs, the user can select whether or not to stop or continue counting
during debugging; For CAN, the user can select whether or not to stop or continue updating receive
registers during debugging; For I2C, the user can select whether or not to stop or continue SMBUS
timeout counting.
In addition, code debugging is supported in Low-power mode. In Sleep mode, the clock programmed by
code remains active for HCLK and FCLK to continue to work. In DeepSleep mode, HICK oscillator is
enabled to feed FCLK and HCLK.
There are several ID codes inside the MCU, which is accessible by the debugger using the
DEBUG_IDCODE at address 0xE0042000. It is part of the DEBUG and is mapped on the external PPB
bus. These codes are accessible using the JTAG debug port or the SWD debug port or by the user
software. They are even accessible while the MCU is under system reset.
Two trace interface modes supported: single-pin mode for serial wire view and multi-pin trace interface.
23.3
I/O pin control
The AT32F425 uses its two general-purpose I/O ports for SW-DP debugging. After reset, the SW-DP
can be immediately used by the debugger by default.
When the debug ports are unused, these dedicated I/Os can be released for general-purpose I/Os
through SCFG registers.
23.4
DEGUB registers
shows DEBUG register map and reset values.
These peripheral registers must be accessed by word (32 bits)
Table 23-1 DEBUG register address and reset value
Register name
Offset
Reset value
DEBUG_IDCODE
0xE004 2000
0xXXXX XXXX
DEBUG_CTRL
0xE004 2004
0x0000 0000
23.4.1 DEBUG device ID (DEBUG_IDCODE)
MCU integrates an ID code that is used to identify MCU’s revision code. The DEBUG_IDCODE register
is mapped on the external PPB bus at address 0xE0042000. This code is accessible by the SW debug
port or by the user code.
Bit
Register
Reset value
Type
Description
Bit 31: 0 PID
0xXXXX XXXX ro
PID information