This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F2410: UART TX interrupt

Part Number: MSP430F2410
Other Parts Discussed in Thread: MSP430F2619

Hi,

Right now we have RX interrupt but TX in a poll mode. Would like to convert TX to interrupt. We need to have a  buffer and the TX interrupt handler sends the data from that buffer.  Here is the current RX interrupt handler.

Do both UART RX and TX have one interrupt handler that checks the some status bit and handles TX and RX or are these separate interrupts and need separate ISR?

In other words, do we need to modify this ISR or add another for TX?

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCIAB1RX_VECTOR
__interrupt void USCI1RX_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCIAB1RX_VECTOR))) USCI1RX_ISR (void)
#else
#error Compiler not supported!
#endif

{
int length = 0;

char c = UCA1RXBUF; //fetch the data does some other logic

}

Our TX pool

void sendCharUART1(char c)
{
while (!(UC1IFG&UCA1TXIFG)); // USCI_A1 TX buffer ready?
UCA1TXBUF = c;
}

Thanks 

**Attention** This is a public forum