Project

General

Profile

Actions

完成 #240

open

t113 rs485 通信乱码

Added by 余 顺 4 months ago. Updated 4 months ago.

Status:
完成
Priority:
普通
Assignee:
-
Category:
其他
Target version:
Start date:
12/23/2023
Due date:
% Done:

100%

Estimated time:

Description

版型:rp—t113s3

系统 :buildroot

测试现象:开发板 RS485能发不能收 波特率 115200 正常 9600 异常乱码

Actions #1

Updated by 余 顺 4 months ago

stty -F /dev/ttyS0 ispeed 115200 ospeed 115200 cs8 -parenb -cstopb -echo 将校验位跟停止位也配置并禁用终端回显

参数说明 奇偶校验位-parenb,停止位-cstopb 禁用回显-echo

加上禁止回显后pc 与开发板通信正常

原因:
因为在串口通信中,终端回显可能会干扰数据的传输。
终端回显会使得接收端在接收到一些数据之前就先接收到了终端回显的字符,从而导致数据接收出现问题。禁用终端回显可以避免这种情况的发生,从而使数据能够正常传输和接收

Actions #2

Updated by 余 顺 4 months ago

  • % Done changed from 0 to 100
Actions #3

Updated by 余 顺 4 months ago

  • Tracker changed from 新建 to 完成
  • Status changed from 新建 to 完成
Actions

Also available in: Atom PDF