Skip to main content
TLinq.1
Visitor II
May 25, 2023
Solved

How to save variables to a file (csv or similar) using expressions

I am running a STM32L412 and am trying to debug some ADC samples, this is done by saving to a dbg_ADC[2000] after ADC sampling, the program is then halted and the expressions are copied out. Currently with version 1.10.1 it crashes too often, sometimes i can copy out 1000 samples and other times i can copy out just a few hundred before crashing and need to restart the program, this happens on all PCs.

So the question is, is there a better way to save expressions/variables/ADC samples to a file for later analysis?

This topic has been closed for replies.
Semer CHERNI
Semer CHERNIBest answer
ST Employee
May 26, 2023

Hello @TLinq.1​ 

First let me thank you for posting.

I may suggest the usage of Serial Wire Tracing to trace the needed data.

For more detail check the 4.2 SWV debugging section from the STM32CubeIDE user guide.

KR,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

1 reply

Semer CHERNI
Semer CHERNIBest answer
ST Employee
May 26, 2023

Hello @TLinq.1​ 

First let me thank you for posting.

I may suggest the usage of Serial Wire Tracing to trace the needed data.

For more detail check the 4.2 SWV debugging section from the STM32CubeIDE user guide.

KR,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.