Some variables contain unbelievable values. Why? [SOLVED]

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

st5000
Posts: 3
Joined: Wed Jan 29, 2020 1:23 pm

Some variables contain unbelievable values. Why? [SOLVED]

Postby st5000 » Tue Feb 18, 2020 1:29 pm

I have been using TrueSTUDIO for about 2 months and so far when I hover over a variable in stopped code the value is reported as expected. But today I had a bout with TrueSTUDIO where many of the checked variables contained unbelievable values. However, the code written to make decisions based on these variables continued to work as expected. As if only TrueSTUDIO was "out of the loop" with respect to the actual variable values.

What is going on?

I switched to using STMStudio. While I can not debug using STMStudio I can see the affected variable. While in TrueSTUDIO these variables contained Unbelievable data. But in STMStudio these variables contained the expected values.

Why?

The variables which continued to contain values as expected in TrueSTUDIO were part of my own code directly called from main(). Most if not all the variables which contained unbelievable data were part of the USB communication code. I am not sure, but data in those variables might be traceable back to interrupt driven code.

Thanks for any help.
Last edited by st5000 on Tue Feb 18, 2020 7:35 pm, edited 1 time in total.

st5000
Posts: 3
Joined: Wed Jan 29, 2020 1:23 pm

Re: Some variables contain unbelievable values. Why?

Postby st5000 » Tue Feb 18, 2020 7:35 pm

Turns out a watch dog timer was not stopped when TrueSTUDIO reached a break. Evidently the watch dog code would corrupt the USB variable values. Commenting out the call to start the watch dog allowed for TrueSTUDIO to debug the USB code w/o incident. I think STMStudio worked because it allows the code to kick the watch dog allowing the USB variable to contain the expected data.


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 3 guests