Can someone please help. I just cannot get the interrupts to run on our module.
I have configured the UART to run using interrupts but the interrupt service routine never gets called yet the UART works fine when driven by polling.
I have enabled the PMC bit:
AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_US0;
I have set up the AIC:
AT91C_BASE_AIC->AIC_IDCR = 1 << AT91C_ID_US0; AT91C_BASE_AIC->AIC_SMR[AT91C_ID_US0] = AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE; AT91C_BASE_AIC->AIC_SVR[AT91C_ID_US0] = (U32)UART_Isr; AT91C_BASE_AIC->AIC_ICCR = 1 << AT91C_ID_US0; AT91C_BASE_AIC->AIC_IECR = 1 << AT91C_ID_US0;
I have enabled the UART:
AT91C_BASE_US0->US_CR = AT91C_US_RXEN | AT91C_US_TXEN; AT91C_BASE_US0->US_IER = AT91C_US_RXRDY;
Have I missed something?
Mike
These type problems have already been posted on numerous forum sites before.
Search for this problem on the web and you will (eventually) find your answer.
Or you could run a UART sample program and work backwards from there.