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.

[参考译文] MSP-EXP430G2:MSP430 Launchpad 未向 PC#39;s 终端发送 UART

Guru**** 2220740 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/736766/msp-exp430g2-msp430-launchpad-not-sending-uart-to-pc-s-terminal

器件型号:MSP-EXP430G2

大家好、我将在 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 模块

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 David:

    根据您的套件用户指南

    这是: