从9600慢慢往上改,我的115200都是这么出来的P3SEL = 0x30; // P3.4,5 = USCI_A0 TXD/RXD UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 0xd0; // 24MHz 115200 (see User's Guide)
UCA0BR1 = 0x00; // 24MHz 115200
UCA0MCTL |= UCBRS_4 + UCBRF_0; // Modulation UCBRSx=1, UCBRFx=0
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
__bis_SR_register(GIE); // Enter LPM3, interrupts enabled
24000000/115200=208.3=0xd0