AnsweredAssumed Answered

Extra bytes got added at the beginning of UART buffer

Question asked by Sethu Madhavan on Nov 26, 2013

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

Outcomes