GD32F20x User Manual
247
with two of five JTAG pin, which is SWDIO multiplexed with JTMS, SWCLK multiplexed with
JTCK. The JTDO is also used as Trace async data output (TRACESWO) when async trace
enabled.
The pin assignment are:
PA15 : JTDI
PA14 : JTCK/SWCLK
PA13 : JTMS/SWDIO
PB4 : NJTRST
PB3 : JTDO
By default, 5-pin standard JTAG debug mode is chosen after reset. Users can also use JTAG
function without NJTRST pin, then the PB4 can be used to other GPIO functions. (NJTRST
tied to 1 by hardware). If switch to SW debug mode, the PA15/PB4/PB3 are released to other
GPIO functions. If JTAG and SW not used, all 5-pin can be released to other GPIO functions.
Please refer to
GPIO chapter for pin configuration.
13.2.3.
JTAG daisy chained structure
The Cortex-M3 JTAG TAP is connected to a Boundary-Scan (BSD) JTAG TAP. The BSD
JTAG IR is 5-bit width, while the Cortec-M3 JTAG IR is 4-bit width. So when JTAG in IR shift
step, it first shift 5-
bit BYPASS instruction (5’b 11111) for BSD JTAG, and then shift normal
4-bit instruction for Cortext-M3 JTAG. Because of the data shift under BSD JTAG BYPASS
mode, adding 1 extra bit to the data chain is needed.
The BSD JTAG IDCODE is 0x790007A3.
13.2.4.
Debug reset
The JTAG-DP and SW-DP register are in the power on reset domain. The System reset
initializes the majority of the Cortex-M3, excluding NVIC and debug logic, (FPB, DWT, and
ITM). The NJTRST reset can reset JTAG TAP controller only. So, it can perform debug
feature under system reset. Such as, halt-after-reset, which is the debugger sets halt under
system reset, and the core halts immediately after the system reset is released.
13.2.5.
JEDEC-106 ID code
The Cortex-M3 integrates JEDEC-106 ID code, which is located in ROM table and mapped
on the address of 0xE00FF000_0xE00FFFFF.
13.3.
Debug hold function overview
13.3.1.
Debug support for power saving mode
When STB_HOLD bit in DBG control register (DBG_CTL) is set and entering the standby
mode, the clock of AHB bus and system clock are provided by CK_IRC8M, and the
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 ...