UM0306 Contents
15/519
20.6.3 Cortex-M3 TAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
20.6.4 Cortex-M3 JEDEC-106 ID Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
20.7 This code is accessible by the JTAG Debug Port (4 to 5 pins) or by the SW
Debug Port (two pins) or by the user software.JTAG debug port 494
20.8 SW debug port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
20.8.1 SW protocol introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
20.8.2 SW protocol sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
20.8.3 SW-DP state machine (Reset, idle states, ID code) . . . . . . . . . . . . . . 497
20.8.4 DP and AP read/write accesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
20.8.5 SW-DP registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
20.8.6 SW-AP registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
20.9 AHB-AP (AHB Access Port) - valid for both JTAG-DP or SW-DP . . . . . 499
20.10 Core debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
20.11 Capability of the debugger host to connect under system reset . . . . . . 500
20.12 FPB (Flash patch breakpoint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
20.13 DWT (data watchpoint trigger) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
20.14 ITM (instrumentation trace macrocell) . . . . . . . . . . . . . . . . . . . . . . . . . . 501
20.14.1 General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
20.14.2 Timestamp packets, synchronization and overflow packets . . . . . . . . 502
20.15 MCU debug component (MCUDBG) . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
20.15.1 Debug support for low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . 503
20.15.2 Debug support for timers and watchdog and bxCAN . . . . . . . . . . . . . . 504
20.15.3 Debug MCU configuration register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
20.16 TPIU (trace port interface unit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
20.16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
20.16.2 Trace pin assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
20.16.3 TPUI formatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
20.16.4 TPUI frame synchronization packets . . . . . . . . . . . . . . . . . . . . . . . . . . 510
20.16.5 Emission of synchronization frame packet . . . . . . . . . . . . . . . . . . . . . . 510
20.16.6 Synchronous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
20.16.7 Asynchronous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
20.16.8 TRACECLKIN connection inside STM32F10x . . . . . . . . . . . . . . . . . . . 511
20.16.9 TPIU registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
20.16.10 Example of configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
20.17 DBG register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513