Which is the easiest way for Global Interruptions Disable/Enable in CA for LPC2129? Varuzhan
As I understand, if program uses both IRQ and FIQ, the __swi function cannot be used. More, if I want to disable interruptions not for the whole function, but only for a part of code, I must write to the VICIntEnClr register as in the example. But in the example one need to disable only TIMER0 interruption. What if I need to disable all interruptions? If I write temp = VICIntEnable; VICIntEnClr = temp; ... VICIntEnable = temp; there is a risk, that if interruption happened between the two first operators, and the interrupt handler changes the value of the VICIntEnable register, a wrong value will be restored by the last operator. Am I wrong? Is there an absolutely reliable way to disable ALL interruptions for LPC2100? It is so easy in other microcontrollers. Varuzhan
You are correct about the __swi, but why do you need to block an fiq? It would be dangerous to change VICIntEnable in an interrupt function! You should not partice this programming style. Reinhard