I'm just a newbie at Maple IDE. Normally, I can use functions: cli(); y=x; sti(); in Arduino IDE. Is there something like "atomic read" for accessing a volatile variable in Maple IDE? My situation is like the code below. Please, is there also some "atomic write" func.?
volatile uint32 my_timeflag;
// init TIM2 code
// reset counter
// A PROBLEM HERE.
// I'd like to do "atomic read" of the
// "my_timeflag" var.
currentValue = my_timeflag; //???
// do something in loop