This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nested interrupts

hi,
Am using LPC2366.From the keil sample software i took two macros IENABLE and IDISABLE and their definitions,used in ISR routine as in sample code.But my software hangs at PAbt_Addr DCD PAbt_Handler.what is the reason?

Parents
  • sorry for previous one

    #define I_Bit                   0x80
    #define F_Bit                   0x40
    #define SYS32Mode               0x1F
    #define IRQ32Mode               0x12
    #define FIQ32Mode               0x11
    static DWORD sysreg;            /* used as LR register */
    
    #define IENABLE __asm { MRS sysreg, SPSR; MSR CPSR_c, #SYS32Mode }
    #define IDISABLE __asm { MSR CPSR_c, #(IRQ32Mode|I_Bit); MSR SPSR_cxsf, sysreg }
    


    this results in hanging

Reply
  • sorry for previous one

    #define I_Bit                   0x80
    #define F_Bit                   0x40
    #define SYS32Mode               0x1F
    #define IRQ32Mode               0x12
    #define FIQ32Mode               0x11
    static DWORD sysreg;            /* used as LR register */
    
    #define IENABLE __asm { MRS sysreg, SPSR; MSR CPSR_c, #SYS32Mode }
    #define IDISABLE __asm { MSR CPSR_c, #(IRQ32Mode|I_Bit); MSR SPSR_cxsf, sysreg }
    


    this results in hanging

Children
No data