cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in STM32CubeIDE?

NGalin
Associate II

Hi,

I have a counter incrementing as:

if (condition == TRUE)

count++

The counter is initialised as:

int count = 0;

I would expect that the counter would increment by '1' every time the condition is 'TRUE'. And this is in fact the case when I'm stepping through the code and have a breakpoint set within the 'if' statement. However, if I let the program run its course, I see in the "Live Expressions" window the count value increment by an arbitrary number. Super strange. This is a simple task, and so I'm at a loss as what could be causing it.

It looks like depending on whether I have a break statement at that line of code determines the value added to "count".

Is this a bug in STM32IDE?

Best,

Nat

1 ACCEPTED SOLUTION

Accepted Solutions
Cartu38 OpenDev
Lead II

Most probably all is working like a charm here.

"Live Expression" doesn't mean "Real time" ....

To get live expression working you've to understand on one side your hardware device is running then on the other some physical data transaction is required thru debug link between such device and your IDE. Debug link transaction is initiated based on some sampling frequency which is less than your cpu one ... A bit disturbing behavior maybe but I would say hopefully working this way if not expecting to get debug workload higher than functional one ...

View solution in original post

2 REPLIES 2
Cartu38 OpenDev
Lead II

Most probably all is working like a charm here.

"Live Expression" doesn't mean "Real time" ....

To get live expression working you've to understand on one side your hardware device is running then on the other some physical data transaction is required thru debug link between such device and your IDE. Debug link transaction is initiated based on some sampling frequency which is less than your cpu one ... A bit disturbing behavior maybe but I would say hopefully working this way if not expecting to get debug workload higher than functional one ...

Hi,

Thanks, makes sense.

In fact, in my case, this behaviour means that the condition I monitor triggers more frequently than I expected. Good to know.

Best,

Nat