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.
大家好、我将在 Windows 10上使用旧的 MSP-EXP430G2 launchpad 与 CCS 8。
由于这是从 Windows 设备管理器中显示的、我认为可以通过 Launchpad 的板载调试器发送 UART 消息。
DCOCTL = 0; BCSCTL1 = CALBC1_1MHz; DCOCTL = CALDCO_1MHz; P1SEL = BIT1 + BIT2;// P1.1 = RXD、P1.2=TXD P1SEL2 = BIT1 + BIT2; UCA0CTL1 |= UCSSEL_2; // SMCLK UCA0BR0 = 8; // 1MHz 115200 UCA0BR1 = 0; // 1MHz 115200 UCA0MCTL = UCBRS2 + UCBRS0; UCA0CTL1 &=~UCSWRST; IE2 |= UCA0RXIE; __bis_SR_register (LPM0_Bits + GIE); //输入 LPM0,启用中断 //在 main #pragma vector=USCIAB0RX_vector __interrupt void USCI0RX_ISR (void) { while (!(IFG2&UCA0TXIFG)); UCA0TXBUF = UCA0RXBUF; }
例如、我测试了此 UART RX 响应示例(PC 的 PuTTy 键盘-> MSP430 RX 创建中断->将其发回 MSP430 TX)
但是、从未发生 RX 中断。
此外、我测试了发送一些消息、但它不会向 COM3端口发送任何消息、尽管我将波特率匹配为115200。
是否无法使用板载调试器发送/接收 UART 消息? 我确实需要这一点来打印调试消息。
我希望我不必连接外部 UART-USB 模块