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.

MSP430F4152串口调试问题

Other Parts Discussed in Thread: MSP430F4152

请教大神,在使用MSP430F4152调试串口,用串口调试助手发送数据,小于127的数据收发都正常,但数据大于127收发就会出错,不知道是什么原因?数据位设置是8位。串口设置程序如下,请求指教,是设置的不对吗?????

/* --------- Board HAL UART Initialization -------- */
void HW_UART_INIT()
{
UCA0CTL1 |= UCSWRST;
P6SEL |= (BIT5 + BIT6); /* P6.5,6 = USCI_A0 RXD TXD */
P6DIR |= BIT6; /* P6.6 Tx */
P6DIR &= ~(BIT5); /* P6.5 Rx */
UCA0CTL0 = 0; /* no parity, 8bit, 1stop, lSb first,uart */
UCA0CTL1 |= UCSSEL_2; /* BRCLK=SMCLK = 8MHz */
UCA0BR0 = 52; /* 8MHz/9600 = ~833.3 = 0x0341 0x0052 */
UCA0BR1 = 0;
UCA0MCTL =UCOS16; /* Modulation UCBRSx = 2 UCOS16*/
UCA0CTL1 &= ~UCSWRST; /* Initialize USCI state machine */
}