主题中讨论的其他器件:MSP430WARE
您好!
我找到 UART 位于 LSB 模式(我在示波器上看到的数据是 对面 这使得接收到的字符为 乱码 。
如何输出正确的字符? 谢谢你。
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.
您好!
我找到 UART 位于 LSB 模式(我在示波器上看到的数据是 对面 这使得接收到的字符为 乱码 。
如何输出正确的字符? 谢谢你。
您好!
您在 https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1261729/ek-tm4c1294xl-how-to-set-uart-s-msb-in-tm4c1294?tisearch=e2e-sitesearch&keymatch=%2520user%253A550490#上有一个重复的帖子 、我刚刚对此进行了解答。 请确保发送器和接收器具有相同的波特率、停止位数和奇偶校验。 根据协议、接收器还必须预测 LSB 进入第一个状态。
您好,Tsal
感谢您的答复。
波特率设置为115200、一个位应为8.6us、但示波器的值为13.3us。 问题可能是什么?
我发现 CPU 是120M、那么 UART 时钟应该是什么?
我使用以下配置:
const UART_Params UART_defaultParams ={
UART_MODE_BLOCKING、/* READMode */
UART_MODE_BLOCKING、/* writeMode */
uart_wait_forever、/* readTimeout */
uart_wait_forever、/* writeTimeout */
null、/* readCallback */
空、/* writeCallback */
UART_RETURN_NEWLINE、/* readReturnMode */
uart_data_text、/* readDataMode */
UART_DATA_TEXT、/* writeDataMode */
uart_echo_off、/* readEcho */
#if 已定义(MSP430WARE)
9600、/*波特率*/
#else
115200、/*波特率*/
#endif
UART_LEN_8、/* dataLength */
uart_stop_one、/* stopbits */
uart_par_none、/* parityType */
(uintptr_t) NULL /* CUSTOM */
};
您好!
在这篇博文 https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1262331/tm4c1294ncpdt-how-to-output-complex-log-via-uart-driver?tisearch=e2e-sitesearch&keymatch=%20user%3A550490#中 、我建议您参考即用型 TI-RTOS UART 示例。 您能否尝试 uartecho 等 UART 示例之一。 我还要在此处附加整个项目。 当我运行项目时、我可以看到字符被发送到 COM 端口。 在本例中、波特率为115200、

这是项目。