cancel
Showing results for 
Search instead for 
Did you mean: 

How long can SWV trace log with PC Sampling run?

nashville-nibbler
Associate II

Im running a debug on a STM32F413CHUx, I'm to figure out the cause of an IWDG reset. To help me I'm running SWV Trace Log outputting the PC Sampling at a cycles per sample of about 16,000 (the highest option).

I increased the trace buffer size to 200000000 and left it running over night.

The problem I'm trying debug takes 5-8 hours to trigger or sometimes longer.

After about 1-2 hours running the IDE becomes unresponsive and locks up.

Is there anyway to make the SWV Trace Log with only the PC Sample enabled reliably run for 8 hours or more? I dont have to capture the full 8 hours, only the most recent data before the reset.

4 REPLIES 4
nashville-nibbler
Associate II

So I maxed out the Serial Wire Viewer Trace Buffer size to "999999999" and tried to run it again but the result is the same as before.

After about 1-2 hours running the IDE becomes unresponsive and locks up.

I am not using any other trace functionality like printf, only PC Sampling is enabled.

Rim LANDOLSI
ST Employee

Hello @nashville-nibbler and welcome to the community,

During an active debugging session, It is recommended to limit the amount of data traced. In fact, too many trace data result in data overflow, lost packets and possibly corrupt data. For optimum performance, trace only data necessary to the task at hand.

Thanks,

Rim

Ok got it thanks. I ended up creating a python script with pyautogui to periodically clear the SWV Trace Log every 30minutes, we have been able to continuously run for hours with this workaround.

Rim LANDOLSI
ST Employee

Hello @nashville-nibbler ,

Thank you for your contributions and for your detailed explanations. The same issue is detected in this post and it has been reported to STM32CubeIDE development team. An internal ticket ID 163337(This is an internal tracking number and is not accessible or usable by customers) is submitted to escalate this issue internally to the STM32CubeIDE team .

I will keep you posted with updates, and I hope that this answered your question.

Thanks,

Rim