cancel
Showing results for 
Search instead for 
Did you mean: 

SWO outputs only works with HSI enabled for SYSCLK, not HSE

mangobay11
Associate II

Hi,

 

I am using a STM32F105RC. I was trying to get SWO printf outputs to work, and found that they only work when I configure HSI (8MHz) to be used for SYSCLK, but not when I configure HSE (25MHz) for SYSCLK. I've confirmed that the external oscillator itself is correct.

 

Any ideas would be appreciated, Thanks!

2 REPLIES 2
TDK
Guru

You'll have to configure the SWV viewer clock rate to match your system clock. In STM32CubeIDE, this is done in the debug configuration window.

TDK_0-1724881769981.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi TDK, thanks for the reply.

I am using OpenOCD. I found that the SWO clock frequency was not set correctly, but I don't understand why.

Anyways, with a core clock frequency of 25MHz and a SWO clock frequency of 2.25MHz I am able to view SWO output