 Hello, and welcome to this presentation of the STM32 Debug Interface. It covers the debug capabilities offered by STM32L4 devices. The debug interface of STM32 products provides an access to MCU internal resources. This interface is used to program the MCU and debug applications using basic debug features. In addition to the basic debugging features, applications benefit from the trace capability used to quickly identify possible malfunctioning parts of the application and to create coverage and profiling reports used for application tests, optimizations, and certifications. The STM32L4 offers several basic debugging features, which are supported by all hardware and software debug tool sets. Debugging hardware can interface with the STM32L4 through the five-wire standard JTAG interface or the two-wire serial wire debug port. The debugging tool set can directly access the AHB access port and AHB master able to access all internal databases or directly read or write to all registers and memories, including programming the flash memory. The user can control the execution of the application through breakpoints and code stepping. When the program reaches a breakpoint, internal peripherals like timers can be frozen in their current state or can be left running. The STM32L4 also supports more advanced debugging features. These features require additional support by the debugging tool set, both hardware and software, as well as support on the MCU side for features requiring additional pins like the Embedded Trace Macro Cell or ETM or the Trace Point Unit Interface or TPUI. The Flash Patch and Breakpoint Unit provides hardware breakpoints for debugging the application or possibly correcting software bugs in the code memory space. The full implementation option offers two literal comparators and six instruction comparators. The Embedded Data Watchpoint Trigger provides four comparators configurable as a hardware watchpoint, ETM trigger, PC sampler, or data address sampler. It provides the necessary information for data tracing and system profiling analysis for which it embeds counters for counting the number of clock cycles, load and store operations, sleep cycles, clocks per instruction, and also information about interrupt overhead. It can also generate reports about the application profile. The Instrumentation Trace Macro Cell or ITM supports print F-style debugging information for diagnostics. Packets can be invoked by software, a direct write to the ITM, or by hardware, triggered from the Data Watchpoint Trigger or DWT. It also provides a timestamp from the 21-bit counter. The Embedded Trace Macro Cell or ETM provides information about the execution flow of the application by tracing data through the DWT or ITM and tracing instructions through the ETM. This information is then sent to the debugger host for processing. This information allows the debugger to completely reconstruct the execution flow. It is very useful to quickly identify bugs and also generate code coverage and profiling reports, which are used for test purposes and certifications. The Traceport Interface Unit formats information from the OnChip Trace Unit, ITM and ETM, and sends them to the debugger host. It supports asynchronous mode with one pin used for communication in single wire mode or synchronous mode with up to five pins working in both JTAG and single wire modes. Synchronous mode provides better data throughput. After a device reset, these pins are not assigned and must be configured by the debugger host. The STM3204 supports flexible debug pin assignments. After a reset, all five debug pins are assigned to the debug interface. The application may reconfigure them back for GPIO operation and release these pins for application use. Please note that these debug pins have internal pull-up or pull-down resistors enabled after a reset to prevent any uncontrolled IO levels on these pins. The debug interface operates in all low power modes. For sleep, stop and standby modes, related bits must be configured in the DBGMCUCR register in order to prevent the clock and regulators from stopping when entering a low power mode. For more technical details, visit the Infocenter.arm.com website.