AnsweredAssumed Answered

Disable interrupts

Question asked by pilli.isaac.001 on Nov 21, 2017
Latest reply on Nov 22, 2017 by Clive One

STMF4 is running and using some of the interrupts.

A a new piece of code needs to be protected from all interrupts but a specific one, which has the highest priority in this application.

 

The trivial solution: 

Go through the entire NVIC, disable every interrupt which is enabled besides the mentioned one, remember these interrupts and at the end of the code enable those interrupts. 

 

Is there a nicer solution ( RTOS is not used) ?

Maybe something that utilize the fact that it is the highest level interrupt?

 

Thanks,

Outcomes