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

【F429】LCD显示串口环境信息有时会卡死 #4

Open
Gorgeous2017 opened this issue Oct 30, 2019 · 2 comments
Open

【F429】LCD显示串口环境信息有时会卡死 #4

Gorgeous2017 opened this issue Oct 30, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Gorgeous2017
Copy link
Owner

有时环境信息显示过长会出现卡死的现象,有时不会。

在接收串口信息并重绘环境数据时操作屏幕,会出现环境信息不再变化的情况

串口输出调试信息,发现出现很多Recevice error

@Gorgeous2017 Gorgeous2017 added the bug Something isn't working label Oct 30, 2019
@Gorgeous2017 Gorgeous2017 self-assigned this Oct 30, 2019
@Gorgeous2017 Gorgeous2017 added this to the 完成串口信息处理 milestone Oct 30, 2019
@Gorgeous2017
Copy link
Owner Author

Gorgeous2017 commented Oct 31, 2019

用串口调试发现F429收到了很多0x52。串口连接AP,发现他收到了很多0x52,然后用ASCII码显示后发现是串口的接收的缓存区满了 ,AP一直输出*"RX OVF!!"*

  • HEX版DEBUG信息

串口接收-RX缓存满1

  • ASCII版DEBUG信息:

串口接收-RX缓存满2

所以串口经常显示不正常。

@Gorgeous2017
Copy link
Owner Author

添加新的DEBUG串口。查看串口信息后发现:当操作屏幕时,I2C的中断处理函数(触控处理)函数会打断串口的接收函数;也不完全是打断,而是执行完一次触控处理函数。 此时循环接收指令字符的中断处理函数逻辑被打断,导致之后的指令串接收不成功,无法更新显示环境信息。

原有的处理逻辑是判断当接收到指令串标志位时开始计数字符串个数,然后逐个接收,最后接收到的指令串末尾为串标志位即结束。

这样的逻辑带来一个问题:当接收到标志位开始计数,并被其他中断打断的话,当重新回到接收逻辑中,会让末尾的标志位被误认为起始标志位,导致接收一直错位。

Gorgeous2017 added a commit that referenced this issue Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant