cancel
Showing results for 
Search instead for 
Did you mean: 

Prints are sometimes missing or truncated when using printf with the SWV ITM mechanism/channel

AAlon.1
Associate

Hi,

I am using the SWV ITM mechanism in order to use printf on Nucleo64 board (STM32F446RE MCU).

I find that in some cases prints are missing in the console, and sometimes the prints are getting truncated.

This happens sometimes when there re many prints in short time, and sometimes even when the print channel is not busy at all.

Is this a known issue?

Why is this happening and how can I prevent this? I want the debug prints to be reliable.

And another question: Is there a way to always enable the prints recording once debugging is started, instead of having to manually switch to the SWV ITM prints console window and press on the red dot "record prints" button every time that I start anew debug session?

Thanks,

Amit.

2 REPLIES 2
Markus GIRDLAND
ST Employee

I would guess that missed prints are due to thread safety. You can read more about that issue here.

Regarding the red button you will still need to manually press it at the start of a new debug session for now.

AAlon.1
Associate

Hi Markus​,

You wrote in the ticket that you referred me to that this should have been fixed for STMCube32 a year ago. I ​am using this IDE and still seeing the problem with it.

In addition I did not use any OS. I only used the main's single thread application, and the prints are still getting corrupted or missing...

So I it seems that your suggestion is not relevant (?), or am I missing something here?​

Thanks​,

Amit.​