|
Hi everyone, I am new to ARM development and would like some help. I am trying to configure the USART to send some characters. While, I am able to send those in the polling mode, I am having some issues when I use the interrupt method of USART.
After configuring the registers (enabling clock, enabling IECR in AIC , setting CR, MR and BRGR), I perform these two operations at the end.
AT91C_BASE_US0->US_CR=AT91C_US_TXEN ; enabling the transmitter AT91C_BASE_US0->US_IER=AT91C_US_TXEMPTY ; enabling the interrupt
Reading the data sheets , I found that as soon as the transmitter is enabled, The TXempty bit in US_CSR is set. Does that mean that immediately after enabling the interrupt, my ISR is getting called ?
IN my case, immediately after the enabling the interrupt , I am getting the ARM undefined instruction exception.
Does anyone what is happening here / what is supposed to happen ? Thanks in advance. Cheers
|