共1条
1/1 1 跳转至页
[讨论]串口转以太网调试

各位大侠好:
小弟最近在调试串口和以太网通信实验时,遇到一些问题,请帮忙解释一下,谢谢!
在从UDP到COM的传送过程中,无任何问题,一切显示正常;
但在从COM到UDP传送过程中,老是出现包丢失的现象,比如第一次发送"com_test" 只能收到com,在第二次发送完接受时才能收到余下的部分,一直都是这样收发下去……
为了协调两者的通信速度,我试着添加了taskDelay()函数,缓解了一下以上问题,但是残留的是,在最初两次收发时还是以上问题,但在第三次及其以后收发时就正常了,百思不得其解……
串口波特率115200,以太网10M/100M自适应!
各位高手有没有好的解决办法,请指点,谢谢了!
Tshell Window 的调试信息:
waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 3
The data of rec_message is com_test
The Number Of Send bytes is 3
waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 5
The data of rec_message is _testest
The Number Of Send bytes is 5
waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 8
The data of rec_message is com_test
The Number Of Send bytes is 8
waiting for receiving data from udp......
关键词: 讨论 串口 以太网 调试 Number bytes
共1条
1/1 1 跳转至页
回复
打赏帖 | |
---|---|
【Zephyr】使用Zephyr外设初始化过程解析被打赏30分 | |
【S32K146】S32DS watchdog 配置使用被打赏20分 | |
【Zephyr】使用 IAR 调试 Zephyr 镜像被打赏20分 | |
赚取电动螺丝刀+电源电路理论知识分享1被打赏5分 | |
我想要一部加热台+分享常见运算放大器电路的应用被打赏5分 | |
【Zephyr】MCXN947 Zephyr 开发入门适配shell被打赏20分 | |
我想要一部加热台+常见的MOS管驱动电路被打赏5分 | |
【我要开发板】6.联合MATLAB记录数据被打赏50分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下串口调试printf输出记录被打赏29分 | |
【瑞萨RA2E1开发板】:使用ADC功能实现位移传感器采集方案被打赏20分 |