This does not look correct and looks like the memory is corrupted. Lets try the following:
- Define a new variable right after the definition of uxSchedulerSuspended.
PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended_Test = ( UBaseType_t ) pdFALSE;
- Start debugger and put a breakpoint in your application task (StartDefaultTask).
- Put a data breakpoint at the location of your new variable
uxSchedulerSuspended_Test
. - Remove the breakpoint created in step 2 and let the debugger continue.
The expectation is that the linker places uxSchedulerSuspended_Test
and uxSchedulerSuspended
close enough and any memory corruption which corrupts uxSchedulerSuspended
, will also corrupt uxSchedulerSuspended_Test
. Since we have a data breakpoint on uxSchedulerSuspended_Test
, the debugger will break as soon as it is changed (which should not happen in a legitimate case).
Thanks.