GD32F20x User Manual
246
13.
Debug (DBG)
13.1.
Overview
The GD32F20x series provide a large variety of debug, trace and test features. They are
implemented with a standard configuration of the ARM CoreSightTM module together with a
daisy chained standard TAP controller. Debug and trace functions are integrated into the
ARM Cortex-M3. The debug system supports serial wire debug (SWD) and trace functions
in addition to standard JTAG debug. The debug and trace functions refer to the following
documents:
Cortex-M3 Technical Reference Manual
ARM Debug Interface v5 Architecture Specification
The DBG hold unit helps debugger to debug power saving mode, TIMER, I2C, WWDGT,
FWDGT and CAN. When corresponding bit is set, provide clock when in power saving
mode or hold the state for TIMER, WWDGT, FWDGT, I2C or CAN.
13.2.
JTAG/SW characteristics
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
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...