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

Can't get interrupts working

Hi, I have trouble getting interrupts to work.

I am using the AT91SAM96RL64 processor from Atmel with the Keil compiler and uVision 4.

Initially I have successfully configured UART0 to send and receive data using a polling method. I now have modified the code to use interrupts but the interrupt handler is never getting called. I have enabled the UART0 in the PMC and configured the associated AIC registers.

// Enable in PMC
AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_US0;
.
// UART config is here....
.
// Set up interrupts
AT91C_BASE_AIC->AIC_IDCR = 1 << AT91C_ID_US0;
AT91C_BASE_AIC->AIC_SMR[AT91C_ID_US0] = 0;
AT91C_BASE_AIC->AIC_SVR[AT91C_ID_US0] = (U32)UART_Isr;
AT91C_BASE_AIC->AIC_IECR = 1 << AT91C_ID_US0;

// Enable receiver and transmitter
AT91C_BASE_US0->US_CR = AT91C_US_RXEN | AT91C_US_TXEN;

// Enable receive interrupt
AT91C_BASE_US0->US_IER = AT91C_US_RXRDY;

Any help would be appreciated.