AnsweredAssumed Answered

stlink v2 & ITM trace

Question asked by ocklin.bernd on Nov 7, 2013
Latest reply on Dec 6, 2013 by antunes.carlos

I am currently stuck with stlink v2 and ITM trace on a STM32F103RB. I am using CMSIS debug support by simply calling ITM_SendChar(). This is the only trace specific code than I am using.

I used SWV in the stlink tool as well as st-trace but I don't see any data. 

When debugging I can also see that I can reach and execute
ITM->PORT[0].u8 = (uint8_t)ch;
I have not found a single hint on certain startup-code or device, clock or other activation code that needs to be used.

Anything I am potentially missing?

I think I saw somewhere that trace is only working when connected with a debugger but that sounds too odd to me. I am not debugging and tracing at the same time.

Physically I am only using GND, VREF, SW CLK, SW DATA IO, SWO and RST of the stlink - works well for debugging and flashing. SWCLK and TRACESWO show some activity on the oscilloscope and only when activated - so something is happening.