![ARTERY AT32F435 Series Скачать руководство пользователя страница 702](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592702.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 702
Rev 2.03
30
Debug (DEBUG)
30.1 Debug introduction
Cortex
™
-M4F core provides powerful 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 two interfaces: serial wire debug (SWD) and JTAG debug port. Trace information is
collected by a single-wire serial wire view interface, or by TRACE interface when a larger trace
bandwidth is needed. Trace and debugging interfaces can be combined into one interface.
ARM Cortex
™
-M4F reference documentation:
Cortex™-M4 Technical Reference Manual (TRM)
ARM Debug Interface V5
ARM CoreSight Design Kit revision r1p0 Technical Reference Manual
30.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.
30.3 I/O pin control
SWJ-DP debug is supported in different packages of AT32F435/437. It uses 5 general-purpose I/O ports.
After reset, the SWJ-DP can be immediately used by the debugger as a default function. To ensure that
JTAG input pins are not floating (particularly SWCLK/JTCK), the JTAG input pins are embedded with
internal pull-up or pull-down feature, NJTRST, JTDI and JTMS/SWDIO with internal pull-up feature, and
JTCK/SWCLK with internal pull-down feature.
GPIO and IOMUX registers can be configured to allow users to switch between debug ports or disable
debug feature.
30.4 DEGUB registers
Table 30-1 shows DEBUG register map and reset values.
These peripheral registers must be accessed by word (32 bits)
Table 30-1 DEBUG register address and reset value
Register name
Offset
Reset value
DEBUG_IDCODE
0xE004 2000
0xXXXX XXXX
DEBUG_CTRL
0xE004 2004
0x0000 0000
DEBUG_APB1_PAUSE
0xE004 2008
0x0000 0000
DEBUG_APB2_PAUSE
0xE004 200C
0x0000 0000
DEBUG_SER_ID
0xE004 2020
0x0000 XX0X