
GD32L23x User Manual
196
The pin assignment are:
Table 12-1. Pin assignment
Pin
Debug interface
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.
General-purpose and alternate-function I/Os (GPIO and AFIO).
12.2.3.
JTAG daisy chained structure
The Cortex
®
-M23 JTAG TAP is connected to a Boundary-Scan (BSD) JTAG TAP. The BSD
JTAG IR is 5-bit width, while the Cortex- M23 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-M23 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.
12.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
®
-M23, 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.
12.2.5.
JEDEC-106 ID code
The Cortex
®
-M23 integrates JEDEC-106 ID code, which is located in ROM table and mapped
on the address of 0xE00FF000_0xE00FFFFF.