Jetson Nx 串口接收数据丢失首字节问题

1 问题描述

I write a uart program using c++ on Jetson Nx(Jetpack 4.6.1,Ubuntu version 18.04 LTS) to communicate with a PC. On PC there’s a uart simulator( as below figure 1) sending data at a period of one second, 30 bytes data are : EB90021112131415161718191A1B1C1D1E1F202122232425262728292A2B

When my program receive the data, it will lost the first byte “EB”, and sometimes more bytes are lost. as show in figure 2:
在这里插入图片描述

Besides, I tried more tests:
1 C code check. I run my c code on a PC( Ubuntu 18.04.6 LTS os on a windows virtual machine), it doesn’t lost byte. As show in figure 3 above:

2 I changed my c code as below ,set a un-blocking mode, it will not lost any data. Thren I change back to blocking mode as below, it won’t lost any data; and then I restart the Nx, and run my original code(blocking mode), the lost first byte ap

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值