Extra bytes got added at the beginning of UART buffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Extra bytes got added at the beginning of UART buffer

369 次查看
Sethu123
Contributor I

Hi,

We have mcf52259 Controller based hardware board and MQX 3.5 OS, which is communicating with external device on RS 485 (MODBUS RTU Protocol).

We have established communication between this device.

we found during reception of data from the external device

one or two extra bytes are getting added to the beginning of the frame sent by that device.

We had debugged and concluded that the bytes are getting added inside UART.

We used Scope and concluded that the additional bytes are not added till the RX pin of the Controller.

Please do find the packets send and received ( Bold ones are the extra bytes).

Note: This behavior is not consistent and sometimes we are getting correct response continuously.

    

TX:- 01 03 08 34 00 01 c7 a4

RX:-  01 03 02 00 c8 b9 d2 ( Right Packet )

TX:-01 03 03 e8 00 06 45 b8

RX:-  5c 01 03 0c 00 40 00 00 00 00 a5 a5 a5 a5 2c ec bd ff (Wrong packet,5c got added at the beginning)

TX:- 01 03 03 e8 00 06 45 b8

RX:-  01 03 0c 00 40 00 00 00 00 a5 a5 a5 a5 2c ec bd ff ( Right Packet )

TX:- 01 03 04 b0 00 01 84 dd

RX:-  fb 01 03 02 00 03 f8 45(Wrong packet,0xfb got added at the beginning)

TX:- 01 03 04 b0 00 01 84 dd

RX:-  01 03 02 00 03 f8 45( Right Packet )

Thanks,

Sethu

0 项奖励
0 回复数