Using Serial Wire And Releasing The Unused Debug Pins As Gpios; Stm32F10Xxx Jtag Tap Connection - ST STM32F101 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F101 series:
Table of Contents

Advertisement

RM0008
31.4.4

Using serial wire and releasing the unused debug pins as GPIOs

To use the serial wire DP to release some GPIOs, the user software must set
SWJ_CFG=010 just after reset. This releases PA15, PB3 and PB4 which now become
available as GPIOs.
When debugging, the host performs the following actions:
Under system reset, all SWJ pins are assigned (JTAG-DP + SW-DP).
Under system reset, the debugger host sends the JTAG sequence to switch from the
JTAG-DP to the SW-DP.
Still under system reset, the debugger sets a breakpoint on vector reset.
The system reset is released and the Core halts.
All the debug communications from this point are done using the SW-DP. The other
JTAG pins can then be reassigned as GPIOs by the user software.
Note:
For user software designs, note that:
To release the debug pins, remember that they will be first configured either in input-pull-up
(nTRST, TMS, TDI) or pull-down (TCK) or output tristate (TDO) for a certain duration after
reset until the instant when the user software releases the pins.
When debug pins (JTAG or SW or TRACE) are mapped, changing the corresponding IO pin
configuration in the IOPORT controller has no effect.
31.5

STM32F10xxx JTAG TAP connection

The STM32F10xxx MCUs integrate two serially connected JTAG TAPs, the boundary scan
TAP (IR is 5-bit wide) and the Cortex
To access the TAP of the Cortex
1.
First, it is necessary to shift the BYPASS instruction of the boundary scan TAP.
2.
Then, for each IR shift, the scan chain contains 9 bits (=5+4) and the unused TAP
instruction must be shifted in using the BYPASS instruction.
3.
For each data shift, the unused TAP, which is in BYPASS mode, adds 1 extra data bit in
the data scan chain.
Note:
Important: Once Serial-Wire is selected using the dedicated ARM
boundary scan TAP is automatically disabled (JTMS forced high).
®
-M3 TAP (IR is 4-bit wide).
®
-M3 for debug purposes:
DocID13902 Rev 15
Debug support (DBG)
®
JTAG sequence, the
1074/1128
1100

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F101 series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f107 seriesStm32f102 seriesStm32f103 seriesStm32f105 seriesStm32f101 series

Table of Contents