How to debug with Serial Wire Viewer tracing on STM32MP15

Revision as of 18:13, 22 January 2021 by Registered User

This article does not intend to cover all STM32CubeIDE Serial Wire Viewer (SWV) capabilities; complete information is available in (UM2609), chapter 4.

This article only provides some setup information for STM32MP15 serie, debugging Cortex-M in Production Mode. In that mode, the available console on the board (UART4) is used by Cortex-A Linux.And the clock tree is managed by Linux. 'Trace clock' needed to setup SWO is available form Linux console with command: awk '/ck_trace/{print $5}' /sys/kernel/debug/clk/clk_summary
In order to test, let's modify main.c file from a generated project with a looping variable 'i' and setup a Comparator on it, as depicted hereafter.

Trace clock from Linux console


Swv-dbg-cfg.png


SWV Setting


SWV Data Trace Output