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

lpc2103 interrupt and unexpected resets

hi

i'm working on lpc2103 and in practice when any interrupt happens , system will reset and then doesn't work properly ( sometime get stuck , sometime reset again ... ) , i think my setting is't right , any ideas what could be wrong ?

Parents Reply Children
  • i know that , and i have install_irq ( for lpc23xx ) function and used it and have its handler function too , but something is wrong , i don't know which part of it must be changed to work for lpc21xx . and i'm not sure about my setting .

    here is my install_irq :

    DWORD install_irq( DWORD IntNumber, void *HandlerAddr, DWORD Priority )
    { DWORD *vect_addr; DWORD *vect_prio;

    VICIntEnClr = 1 << IntNumber; /* Disable Interrupt */ if ( IntNumber >= VIC_SIZE ) { return ( FALSE ); } else { /* find first un-assigned VIC address for the handler */ vect_addr = (DWORD *)(VIC_BASE_ADDR + VECT_ADDR_INDEX + IntNumber*4); vect_prio = (DWORD *)(VIC_BASE_ADDR + VECT_PRIO_INDEX + IntNumber*4); *vect_addr = (DWORD)HandlerAddr; /* set interrupt vector */ *vect_prio = Priority; VICIntEnable = 1 << IntNumber; /* Enable Interrupt */ return( TRUE ); }
    }