Mega2560 UART1 no URDIE1 interrupts
2013-07-13 by Dave McLaughlin
Hi all,
I have an Arduino Mega2560 board and programming it with Studio 6.1 and AVR
GCC. I am debugging with a JTAG ICE3
The issue is that there is no transmit register empty interrupts for USARTS
1 to 3. USART0 is ok.
This code is used to set the control register for USART1 but nothing happens
and there is no interrupt firing.
UART1_CONTROL |= (1 << UART1_UDRIE);
I am using code that is at the link below and if I use UART0 it all works
and interrupts are working.
I just don't get any interrupts with USART's 1 to 3.
I do have USART1 enabled in the header file.
Reading back both the STATUS and CONTROL registers, the bit for URDIE is set
in both so the interrupt should be firing.
I do have sei() in the code after the UART is initialised. As I said, UART0
works.
I have used a #error at points in the code to confirm what's been compiled
and it is all as expected.
This is a link to the library.
https://github.com/andygock/avr-uart/wiki
Appreciate any pointers to consider?
[Non-text portions of this message have been removed]