Closed Zaltora closed 5 years ago
It should disable all interrupt. You should used just for few operation, that must be atomic. It disable interrupt execution. Interrupt is not lost, it will be executed immediately after call exit critical.
okay, thank you ! I use it for 2 operation to get time and a measure in an atomic way. I was afraid that interrupt was lost. A second solution for me was this :
static bool flag_atomic;
void vApplicationTickHook(void)
{
flag_atomic = false;
}
void myFunction(void)
{
do {
flag_atomic = true;
// Operation 1 here
// Operation 2 here
// ....
while(!flag_atomic);
}
Simple question, Use
taskENTER_CRITICAL()
andtaskEXIT_CRITICAL()
disable interrupt ? It didn't disable interrupt from GPIO or TIMER ?