hi I'm using MDK arm uvision4 and LPC2368 , and i wanna use nesting interrupts ,and i'm using this code to do that :
#define IENABLE /* Nested Interrupts Entry */ \ __asm { MRS LR, SPSR } /* Copy SPSR_irq to LR */ \ __asm { STMFD SP!, {LR} } /* Save SPSR_irq */ \ __asm { MSR CPSR_c, #0x1F } /* Enable IRQ (Sys Mode) */ \ __asm { STMFD SP!, {LR} } /* Save LR */ \ #define IDISABLE /* Nested Interrupts Exit */ \ __asm { LDMFD SP!, {LR} } /* Restore LR */ \ __asm { MSR CPSR_c, #0x92 } /* Disable IRQ (IRQ Mode) */ \ __asm { LDMFD SP!, {LR} } /* Restore SPSR_irq to LR */ \ __asm { MSR SPSR_cxsf, LR } /* Copy LR to SPSR_irq */ \
and using these code (IENABLE and IDISABLE) at the beginning and end of each interrupt , but when an interrupt e.g external interrupt 1 happens then during it e.g I2c happens the I2c interrupt won't work , i checked it the Vector address value won't change after the I2c interrupt , By the way they work fine separately . i wanna know what could be wrong ? thank you ...