hi,
i'm trying to use UART to print on the linux terminal and i'm using this code segment.
#include "msp430f5438.h"
void main()
{
P5SEL = 0xC0;
UCA1CTL1 = UCSSEL_2 + UCSWRST;
UCA1BR0 = 0x09;
UCA1MCTL = UCBRS_1;
UCA1CTL1 &= ~UCSWRST;
while(!(UCA1IFG & UCTXIFG));
UCA1TXBUF = '5';
UCA1CTL1 |= UCSWRST;
}
here it prints '5' on the terminal after that it keeps printing junk infinitely. even after stopping the UART. why does that happen ? am i missing something ?