This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 interrrupt question

Hi, 

I have a project run on DM365 without OS,

now I want to set the interrupt, however,  EINT0 and EINT1 in Interrupt Controller does not work.

How to select the interruct source?

My code:

   DiableIRQ();

       
        Int_Reg = (INTC_REGS*)0x01C48000;
       
    // Mask all interrupts
        Int_Reg->INTCTL = 0x4;
        Int_Reg->EABASE = 0x0;
        Int_Reg->EINT0 = 0x0;
        Int_Reg->EINT1 = 0x0;       
   
       
    // Clear all interrupts
        Int_Reg->FIQ0 = 0xFFFFFFFF;
        Int_Reg->FIQ1 = 0xFFFFFFFF;
        Int_Reg->IRQ0 = 0xFFFFFFFF;
        Int_Reg->IRQ1 = 0xFFFFFFFF;
       
        Int_Reg->INTCTL = 0x0002;
        Int_Reg->EABASE = 0x0000;
        Int_Reg->EINT0 |= 0x001 << 12; 
       
        EnableIRQ();



void EnableIRQ(void) {
        int r0;
        __asm {
                MRS             r0, cpsr
                EOR             r0, r0, #0xC0
                MSR             cpsr_c, r0
                NOP
                NOP
        }
       
}


void DiableIRQ(void) {
        int r0;
        __asm {
                MRS             r0, cpsr
                ORR             r0, r0, #0xC0
                MSR             cpsr_c, r0
                NOP
                NOP
        }
       
}