__disable_irq() and __enable_irq() has no effect
Hello,
I am working on a project with an STM32f446 and I need to disable all interrupts while executing a specific critical function.
I put in my code the following lines :
__disable_irq();
Critical_function();
__enable_irq();
But I still get interrupt while critical_function is executed.
I have tried to find where __disable_irq and __enable_irq are in my project (with both "ctr F" and "Go to definition" fonctionalities) I only found them commented in cmsis_armcc.h file.
/**
\brief Disable IRQ Interrupts
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
Can only be executed in Privileged modes.
*/
/* intrinsic void __disable_irq(); */
I do not have any error or warning at the compilation due to these function calls, and in debug mode both of them seem not to do anything.
Would anyone have any idea about why it is not working ?
Is there a better way to disable interrupt ?
I am working on Keil v5.28.
Regards
Simon
