Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
624
/
631
ITM: execution tracking unit
FPB: Flash instruction breakpoint
DWT: data trigger
Reference:
Cortex
TM
-M4 Technical Reference Manual (TRM)
ARM debugging interface V5 structure specification
ARM CoreSight development tool set (r1p0 version) technical reference manual
The system supports low-power mode debugging and debugging of some peripherals. The peripherals supporting
debugging include: CAN, I2C, TIMER, WWDG and IWDG modules. The user needs to set the corresponding bit of
the debug control register (DBG_CTRL) to 1 when debugging with low power consumption or peripherals.
JTAG/SWD function
The debugging tool can call the debugging function through the SWD debugging interface or JTAG debugging
interface mentioned above.
Switch JTAG/SWD interface
The chip uses JTAG debug interface by default. If you need to switch the debug interface, you can switch between
SWD interface and JTAG interface through the following operations:
JTAG debug to SWD debug switch:
1.
Send JTMS = 1 signal with more than 50 JTCK cycles;
2.
Send 16-bit JTMS = 1110011110011110(0xE79E LSB) signal;
3.
Send JTMS = 1 signal with more than 50 JTCK cycles.
Switch from SWD debugging to JTAG debugging:
1.
Send JTMS = 1 signal with more than 50 JTCK cycles;
2.
Send 16-bit JTMS = 1110011100111100(0xE73C LSB) signal;
3.
Send JTMS = 1 signal with more than 50 JTCK cycles.
Pin allocation
JTAG debugging interface includes five pins: JTCK (JTAG clock pin), JTMS (JTAG mode selection pin), JTDI
(JTAG data input pin), JTDO (JTAG data output pin) and NJTRST (JTAG data reset pin, low level reset pin).
SWD (serial debugging) interface includes two pins: SWCLK (clock pin) and SWDIO (data input and output pin),
which provide the interface of two pins: data input and output pin (SWDIO) and clock pin (SWCLK).
See the following Table for the pin allocation of JTAG debugging interface and SWD debugging interface (SWDIO
is alternated with JTMS, SWCLK is alternated with JTCK):