29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RM0008<br />

Debug support (DBG)<br />

JTAG-DP <strong>and</strong> enables the SW-DP. This way it is possible to activate the SWDP using only<br />

the SWCLK <strong>and</strong> SWDIO pins.<br />

This sequence is:<br />

1. Send more than 50 TCK cycles with TMS (SWDIO) =1<br />

2. Send the 16-bit sequence on TMS (SWDIO) = 0111100111100111 (MSB transmitted<br />

first)<br />

3. Send more than 50 TCK cycles with TMS (SWDIO) =1<br />

29.4 Pinout <strong>and</strong> debug port pins<br />

The STM32F10xxx MCU is available in various packages with different numbers of available<br />

pins. As a result, some functionality related to pin availability may differ between packages.<br />

29.4.1 SWJ debug port pins<br />

Five pins are used as outputs from the STM32F10xxx for the SWJ-DP as alternate functions<br />

of General Purpose I/Os. These pins are available on all packages.<br />

Table 198.<br />

SWJ-DP pin name<br />

JTMS/SWDIO<br />

SWJ debug port pins<br />

JTAG debug port SW debug port Pin<br />

assign<br />

Type Description Type Debug assignment ment<br />

I<br />

JTAG Test Mode<br />

Selection<br />

I/O<br />

Serial Wire Data<br />

Input/Output<br />

PA13<br />

JTCK/SWCLK I JTAG Test Clock I Serial Wire Clock PA14<br />

JTDI I JTAG Test Data Input - - PA15<br />

JTDO/TRACESWO O JTAG Test Data Output -<br />

TRACESWO if async trace<br />

is enabled<br />

PB3<br />

JNTRST I JTAG Test nReset - - PB4<br />

29.4.2 Flexible SWJ-DP pin assignment<br />

After RESET (SYSRESETn or PORESETn), all five pins used for the SWJ-DP are assigned<br />

as dedicated pins immediately usable by the debugger host (note that the trace outputs are<br />

not assigned except if explicitly programmed by the debugger host).<br />

However, the STM32F10xxx MCU implements the AF remap <strong>and</strong> debug I/O configuration<br />

register (AFIO_MAPR) register to disable some part or all of the SWJ-DP port <strong>and</strong> so<br />

releases the associated pins for General Purpose I/Os usage. This register is mapped on an<br />

APB bridge connected to the Cortex-M3 System Bus. Programming of this register is done<br />

by the user software program <strong>and</strong> not the debugger host.<br />

Doc ID 13902 Rev 9 955/995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!