Hello, I am trying to use STLink V2 to debug my project using the STM32F405 microcontroller. I followed the instructions like https://www.keil.com/support/man/docs/ulink2/ulink2_ctx_trace.htm and tutorials on youtube to set up the trace configuration, but the interface in Keil V220.127.116.11, which I am using, has changed and the I always got SW buffer overrun error messages.
In Keil V18.104.22.168, there is no "Autodetect" option for the SWO port as shown in the tutorials. So I just use the default settings with Configure Target and Set Max checked.
The core clock is 168MHz. When I choose "use the core clock", the SWO clock automatically changes into 12MHz with a Prescaler of 14. But in the Target Com part of the Debug page, the clock selected is only 1.8 MHz. Even if I changed the Req to 12 MHz, the selected is still the same. I am really confused about these settings. Could anyone give me any hints about it? Thanks.
Try reducing core clock, as at that clock there is too much information for SWO to swallow.
Thanks. I followed a video on youtube which uses a Nucleo-F401RE board to demo the print() debug window. In his demo, the core clock is 84MHz, and he uses the old version with the SWO autodetect which automatically sets the SWO clock to 2MHz with a Prescaler of 42. I changed my core clock to 80MHz, but I still got the error message. The help file that comes with Keil still shows the old version interface.
Which board are you using?Is that a custom or STMicroelectronics board?
I use a custom board, but I also tested on STM32F407DISC and NUCLEOL476RG. None of them is working. The problem is not the hardware. The new Keil Vision does not provide updated documents to explain its new interface features.
Only thing I can suggest is to contact support.