AnsweredAssumed Answered

Wrong values in debugger

Question asked by rebeat.pete on Jul 21, 2014
Latest reply on Jul 29, 2014 by Clive One

Hi everyone,

I'm using CooCox with a STM32F4. I have a big issue with the Coocox debugger:

static STEP_MODE val_step_mode = FALSE;

1  if ((Get_Core_Current_Track()->step_mode)  !=  val_step_mode)
2  {
3         val_step_mode = Get_Core_Current_Track()->step_mode;
4         return BS_SUB_MODE;
5  }

The first line compares a value in the core of my program with a static value 'val_step_mode'. if the two values are different, I then put the core value in the static one, waiting for the next test. 
When I press a button on my board, the first condition is valid and the execution enters the 'if' condition. I know then for sure that 'val_step_mode' is different of the core value. At this point, the 'expression' log indicates 0 for val_step_mode. Now when I execute one step further, the core value is transfered to val_step_mode, but the value is still 0. That case is of course impossible.

The thing is the code seems to work fine, as the other functions are behaving like they could see the right values.

I have many similar cases in my code and the values displayed by the 'expression' tab are always wrong. I know it's the debugger problem because the other functions in the code seems to receive the right values and are responding correctly. I'm really stuck here, any ideas? Did you ever experienced this kind of problem?

Thanks in advance.