2019-07-23 11:34 AM
How to enable SWO with OpenOCD + ST-Link? Is that possible with st-link v3 and STM32F407?
2019-07-23 12:04 PM
Well SWO/SWV does work with the ST-LINK/V3, one common issue is that it doesn't run at 2 MHz any more, so the bit/baud setting can be wrong with respect to the SYSCLK. On the L4+ board I seem to recall it using a 15 MHz data clock, and needing to set the core/clock dividers appropriately.
printf("SWV %d\n", *((unsigned int *)0xE0040010)); // TPIU Async Clock Prescaler Register
*((unsigned int *)0xE0040010) = (SystemCoreClock / 15000000) - 1; // SWV Clock on ST-LINK/V3
2019-07-23 12:16 PM
Hmm, but with st-link GDB server 2MHz output is working. Trouble only with OpenOCD?