I found this question that is very close to mine, but it is locked and the answers didn't help me. So I've decided to make a new question.
I'd like to know (in C [DRM] or assembly) how to:
- store the old Global Interrupt State
- disable interrupts
- restore the old Global Interrupt State back.
I come from the AVR world, where we do that saving SREG, clearing a bit and restoring SREG back. And that's all. But I didn't find out how to do the same on ARM Cortex M4F.
One answer in the thread I've linked talk about a driverlib's function: IntMasterDisable. I've tried to look at the code but I know very little about ARM assembly right now.