I am attempting to transfer debug messages from an STM32 (STM32F103VE) via ULINK2. I am outputting the messages via the ST library version of ITM_ReceiveChar.
Serial Wire works great for "normal" debugging and programming, but the trace features seem to fail. When the micro is running with debugger active I get a "No Synchronization". The keil website says this can be a hardware issue, but these pins work great for JTAG at high speed, so I'm doubtful of this.
ITM_ReceiveChar can be traced right into the function, but the output does not appear in the debug window.
I have trace enabled in debug settings, TRACE_MODE=asynchronous and TRACE_IOEN=yes in my .ini file.
Anybody know why tracing is not working?
I've quadruple checked the core clock (HCLK) via setting in peripheral debug window and various other ways, 72 MHz in my case. Of course the micro doesn't power on at this speed. I'll try this example and see how I go.
Tried out that example. Same results...No Synchronization. If JTAG firmware verify works then that's the same line as the trace connector, so the connection should be fine right? I put a CRO on the trace line and can see heaps of activity.
Tried a totally different board (previous tests were on a prototype board). Now using STM32-h103 from olimex, same micro but not made by me.
It still doesn't work.
If JTAG firmware verify works then that's the same line as the trace connector, so the connection should be fine right?
Not necessarily. Serial Wire Trace uses a separate pin SWO (shared with TDO) where Serial Wire Debug uses SWCLK/TCK and SWDIO/TMS.
You can verify the connection of all Serial Wire lines buy switching the debug port to JTAG (without trace).
"No Synchronization" usually means that the SWO signal is not present or the frequency doesn’t match. Check the waveform on the SWO line. Should be UART style communication with frequency matching the trace setting.