请问为什么下面波特率设置错误,串口通信还能跑得很正常,谢谢
int main()
{
WDTCTL = WDTPW+WDTHOLD;
// Init the device with 24MHz DCOCLCK.
//InitClk
CSCTL0_H = 0xA5;
CSCTL1 |= DCORSEL + DCOFSEL0 + DCOFSEL1; // Set max. DCO setting
CSCTL2 = SELA_1 + SELS_3 + SELM_3; // set ACLK - VLO, the rest = MCLK = DCO
CSCTL3 = DIVA_0 + DIVS_0 + DIVM_0; // set all dividers to 0
//InitUart
P2SEL1 |= BIT0 + BIT1;
P2SEL0 &= ~(BIT0 + BIT1);
// Configure UART 0
UCA0CTL1 |= UCSWRST;
UCA0CTL1 = UCSSEL_2; // Set SMCLK as UCLk
UCA0BR0 = 156 ; // 9600 baud
// 8000000/(9600*16) - INT(8000000/(9600*16))=0.083
UCA0BR1 = 0;
// UCBRFx = 1, UCBRSx = 0x49, UCOS16 = 1 (Refer User Guide)
UCA0MCTLW = 0x4911 ;
UCA0IE |= UCRXIE; // Enable RX interrupt
UCA0CTL1 &= ~UCSWRST;
__bis_SR_register(GIE);
while(1)
{
}
}

