Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0038版LOD串口1输出异常 #18

Open
BestHYY opened this issue Jan 9, 2020 · 10 comments
Open

V0038版LOD串口1输出异常 #18

BestHYY opened this issue Jan 9, 2020 · 10 comments

Comments

@BestHYY
Copy link

BestHYY commented Jan 9, 2020

更新V0038版内核后串口1输出不正常,从示波器上看,数据输出过程中会被打断,一包10字节的数据输出会被拆成3~4段,造成输出数据错误

@chenxuuu
Copy link
Collaborator

chenxuuu commented Jan 9, 2020

波形图看每个数据字节都是完整的吗?不是的话贴一下图。
间隔有多长?

@BestHYY
Copy link
Author

BestHYY commented Jan 13, 2020

字节数据并不完整,被打断了,我拍了一帧误码的图,数据被截成了两段,中间被63.6ms的低电平截断,应该发出的数据是2B 4D 4F 44 45 3A 61 75 72 6F 72 61 0A。被截断后示波器逻辑出现错位,后续数据出现误码
uart1
uart2
uart3

@chenxuuu
Copy link
Collaborator

有可复现的代码吗?这里测一下
概率有多大

@BestHYY
Copy link
Author

BestHYY commented Jan 13, 2020

这段代码是我们产品的一部分,不太好拆出来,复现概率比较大,开机前几包数据都没什么问题。我们的串口初始化为9600, 8, N, 1,使能了P0_5作为485OE使能信号,有效电平为1,启用了发送完成callback和接收数据callback,在收到AT指令处理回复、modbus报文收发中都出现了这个现象,甚至有连续12包modbus报文都被截断导致读取失败。

@chenxuuu
Copy link
Collaborator

有没有调用过rtos.sleep?

@BestHYY
Copy link
Author

BestHYY commented Jan 13, 2020

没有

@chenxuuu
Copy link
Collaborator

没有复现方法,这个比较难分析

@BestHYY
Copy link
Author

BestHYY commented May 6, 2020

你好,经过测试,我们整理了可以复现该现象的代码。
使用usb-485向air202发送数据,air202会回复相同的内容,此时会出现乱码,从示波器上看,输出波形中间被高电平截断。
测试平台air202,底层lod版本 V0038_SSL
TestSerial.zip

@wendal
Copy link
Member

wendal commented May 7, 2020

485? DTU固件?

@BestHYY
Copy link
Author

BestHYY commented May 8, 2020

不是DTU固件,可以复现问题的脚本我附在附件里了,同样的代码在air720上可以正常运行,air202上输出会被截断

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants