Skip to main content
Visitor II
August 28, 2024
Question

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

  • August 28, 2024
  • 1 reply
  • 619 views

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!

    This topic has been closed for replies.

    1 reply

    Super User
    August 28, 2024

    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

     

    Visitor II
    August 28, 2024

    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