We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I work with the AT91 controller from atmel, which managed all interrups by the Advanced Interrupt Controller (AIC).
I've critical code zone, where no interrups should be occured.
unsigned int mask; //disable interrupts mask = AT91C_BASE_AIC->AIC_IMR; AT91C_BASE_AIC->AIC_IDCR = 0xFFFFFFFF; //critical code //critical code //enable interrupts AT91C_BASE_AIC->AIC_IECR = mask;
If an interrupt occurs just before the AIC is disabled but not processed until just afterwards, I will get a suprious interrupt.
If I only disable the AIC - without saving the mask register - I have to enable all interrupts step by step.
What's the best way to do that?
Thomas
SWI ( SoftWare Interrupt ) will protect your code from any IRQ, but not from FIQ.