MSP430 USART setup

In the 23x0 family, anytime an rx break is detected, the UART stops receiving bytes until it's reset/unreset. This is described in errata USCI16. Code to reset the UART anytime a break has been detected:

lastStatus = UCA0STAT;
b = UCA0RXBUF;
if (lastStatus & UCBRK) {
// bug in TI hardware: break shuts down UART, so restart it
	UCA0CTL1 |= UCSWRST;
	UCA0CTL1 &= ~UCSWRST;
	}
handleRxByte(b);

See also: