본문 바로가기

Hop the wag during working

Cortex JTAG, SWD Debug Port Sharing

Cortex Debug Connector(10-pins)

Cortex Debug + ETM Connector(20-pins)


ARM Standard JTAG Connector(20-pins)

ARM Standard JTAG Port Pull-up, Pull-down 설정

Debug Port Mode Switching
JTAG to SWD Switching
To switch SWJ-DP from JTAG to SWD operation :
1. Send more than 50 SWCLKTCK cycles with SWDIOTMS=1.
   This ensures that both SWD and JTAG are in their reset states.
2. Send the 16-bit JTAG-to-SWD select sequence on SWDIOTMS(0x79E7).
3. Send more than 50 SWCLKTCK cycles with SWDIOTMS=1.
   This ensures that if SWJ-DP was already in SWD mode,
    before sending the select sequence, the SWD goes to line reset.
4. Perform a READID to validate that SWJ-DP has switched to SWD operation.

SWD to JTAG switching
To switch SWJ-DP from SWD to JTAG operation :
1. Send more than 50 SWCLKTCK cycles with SWDIOTMS=1.
   This ensures that both SWD and JTAG are in their reset states.
2. Send the 16-bit SWD-to-JTAG select sequence on SWDIOTMS(0x3CE7).
3. Send at least five SWCLKTCK cycles with SWDIOTMS=1.
   This ensures that if SWJ-DP was already in JTAG mode before sending
   the select  sequence, it goes into the TLR state.
4. Set the JTAG-DP IR to READID and shift out the DR to read the ID.