cancel
Showing results for 
Search instead for 
Did you mean: 

Is that possible to use SWO without Debugger?

Yevpator
Associate III

Hi,

My target is STM32L151 (Cortex M3). ​I would like to print data through SWO without a debugger connected to SWD . Is it possible? If it is, should I configure something in the STM32?

Thank you for any help!​

5 REPLIES 5

It is a debugger transport. You might be able to decode the stream coming from the SWO pin, but if you could do that you probably wouldn't be asking here.

The ST-LINK Utilities provides a SWV viewer.

The classic alternative is to use a USART to output a debugging/telemetry stream. This can be buffered or high rate.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Yevpator
Associate III

"but if you could do that you probably wouldn't be asking here"

My colleague tried and indeed failed, but it is not clear whether she didn't configure something or it just can't work. I am not sure I got you properly. Did you mean to say that without SWD we cannot utilize SWO?

As for the alternative to use UART instead of SWO, as you mentioned, of course the option is on the table, but we don't have a spare UART Tx pin, therefore using SWO is attractive (we have SWO anyways). ​

Thank you very much for your help!​

Well there's some setup on the STM32 side to get the ETM/DWT/TPI units configured, and baud rates set up. The data is manchester encoded in the highest states, and usually 2MHz for the SWV as I recall.

http://www.keil.com/coresight/

You're alternative would be to modulate your own data format on PB3, which is attached to TIM2_CH2, or implement a software UART driven via IRQ or DMA.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

This tool https://www.st.com/en/development-tools/stm-studio-stm32.html

is not a debugger but uses SWO to get and display data from a stm32.

-- pa

Yevpator
Associate III

Hi Pavel,

I know this tool , I used to work with it while debugging a project with STM8L. The existence of such a tool does not prove me anything. Maybe it uses both SWD and SWO​? A thought just crossed my mind. I can put a scope on SWD pin while working with STM-Studio in order to see if SWD is actually in use.

Thanks!​