![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 261](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782261.webp)
GD32A50x User Manual
261
13.
Debug (DBG)
13.1.
Introduction
The GD32A50x series provide a large variety of debug and test features. They are
implemented with a standard configuration of the Arm
®
CoreSightTM module together with a
daisy chained standard TAP controller. Debug function is integrated into the Arm
®
Cortex
®
-
M33. The debug system supports serial wire debug (SWD) function in addition to standard
JTAG debug. The debug function refer to the following documents:
Cortex
®
-M33 Technical Reference Manual
Arm Debug Interface v5 Architecture Specification
The DBG hold unit helps debugger to debug power saving mode, TIMER, I2C, WWDGT,
FWDGT, CAN and MFCOM. When corresponding bit is set, provide clock when in power
saving mode or hold the state for TIMER, WWDGT, FWDGT, CAN, I2C or MFCOM.
13.2.
JTAG/SW function overview
Debug capabilities can be accessed by a debug tool via serial wire (SW - Debug Port) or
JTAG interface (JTAG - Debug Port).
13.2.1.
Switch JTAG or SW interface
By default, the JTAG interface is active. The sequence for switching from JTAG to SWD is:
Send 50 or more TCK cycles with TMS = 1.
Send the 16-bit sequence on TMS = 1110011110011110 (0xE79E LSB first).
Send 50 or more TCK cycles with TMS = 1.
The sequence for switching from SWD to JTAG is:
Send 50 or more TCK cycles with TMS = 1.
Send the 16-bit sequence on TMS = 1110011100111100 (0xE73C LSB first).
Send 50 or more TCK cycles with TMS = 1.
13.2.2.
Pin assignment
The JTAG interface provides 5-pin standard JTAG, known as JTAG clock (JTCK), JTAG mode
selection (JTMS), JTAG data input (JTDI), JTAG data output (JTDO) and JTAG reset
(NJTRST, active low). The serial wire debug (SWD) provide 2-pin SW interface, known as
SW data input/output (SWDIO) and SW clock (SWCLK). The two SW pin are multiplexed with
two of five JTAG pin, which is SWDIO multiplexed with JTMS, SWCLK multiplexed with JTCK.