Interrupt Subroutines
7-13
Interrupts
7.5.3
Nested Interrupts
Sometimes it is desirable to allow higher priority interrupts to interrupt lower
priority ISRs. To allow nested interrupts to occur, you must first save the IRP,
IER, and CSR to a register which is not being used or to or some other memory
location (usually the stack). Once these have been saved, you can reenable
the appropriate interrupts. This involves resetting the GIE bit and then doing
any necessary modifications to the IER, providing only certain interrupts are
allowed to interrupt the particular ISR. On return from the ISR, the original val-
ues of the IRP, IER, and CSR must be restored.