2022-08-30 08:53 AM
Hello,
It worked for about a year or two but was found to not work when trying it after some weeks. I have checked the obvious items:
Enabled in Project properties Debug
I am using the standard code
although, on a breakpoint there, that value should not be zero, but doing
ITM->TER |= 1;
makes it 1 but does not help.
Then this button needs to be clicked
What could cause this?
AIUI ticking that box at the top screenshot enables the debug macrocell.
And SWO wire is connected. These connections have never been changed. I have swapped over the debuggers (2 x STLINK V3, ISOL and non ISOL, STLINK V2 which I think doesn't have ITM anyway). Tried different SWV speeds e.g. 1000kHz.
Something else is broken.
I would be grateful for any ideas.
2022-08-30 11:47 AM
Running at 168 or 180 MHz?
Try in STM32 Cube Programmer.
Debugger is supposed to set clocking and gearing. Based on knowledge of actual core frequency.
2022-08-30 01:45 PM
Besides of the shown debugger dialog, when the debugger breaks on main(), open the ITM settings (dialog with many checkboxes) and check at least channel 0 (used for prints).
Also enter there the CPU core frequency in MHz, which is established after calling SystemClockConfig().
(so ITM prints will not work before calling SystemClockConfig).
2022-08-30 02:42 PM
You guys are brilliant.
I had seen that screen before, a long time ago, but could not find it again this time.
How bit 0 got cleared, I have no idea. Working now!
THANK YOU!