JTAG Pin:
First, SWD and the traditional debugging mode difference
1. SWD mode is more reliable than JTAG in high-speed mode
2. When the GPIO is just missing, you can use the SWD emulation, which supports fewer pins
3. The SWD mode is recommended when the size of the board is limited
Second, the emulator to the SWD mode support situation
1. The common emulator on the market for the SWD mode support situation
JLINKV8 very good support for SWD simulation mode, speed can be up to 10M
ULINK2 very good support SWD mode, speed can reach 10M
2. Different on the SWD hardware interface
(1) The hardware interface required by JLINKV7 is: GND, RST, Swdio, SWDCLK (2) The hardware interface required for the JLINKV8 is: VCC, GND, RST, Swdio, SWDCLK (note: Below are my own actual connection with JLINKV8 and corresponding Experimental results) (3) ULINK1 does not support SWD mode (4) ULINK2 required hardware interface for: GND, RST, Swdio, Swdclk three, in MDK SWD mode settings
The normal JTAG requires 20 pins, while the J-link SWD requires only 2 wires (Pa13/jtms/swdio,pa14/jtck/swclk) (plus the Power cord 4), thus saving 3 I/O ports (PA15/JTDI, Pb3/jtdo, Pb4/jntrst) for other uses, and can save a portion of the board space (only 4 ports can be)
The first step:
Step Two:
In addition, the JTAG pin can be reused as an IO port, but in this way, the jlink will not be able to connect to the chip. There are two ways to solve the problem: (1) Another program, do not reuse the JTAG as I/O port, and then the program with the serial port tool written to the chip (2) will be boot0/boot1 set to the internal RAM startup, then the power will not execute Flash program, so jlink can be smooth " Take over "JTAG pin
JTAG Connection mode for SWD