uart communication issue with parity bit disabled

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

uart communication issue with parity bit disabled

Jump to solution
1,849 Views
creatorwonny
Contributor III

Hi

I already posted a question in the following link about issue in modbus communication that slave received one packet as several packets when master sends many data to the slave. The solution I found was setting the parity bit of uart to either even or odd instead of none. 

[NORMAL]

Rx:01 10 00 00 00 64 C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D4 93

[ERROR]

Rx:01 10 00 00 00
Rx:64 C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Rx:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D4 93

https://community.nxp.com/t5/i-MX-RT/Modbus-serial-communication-error-in-UART3-but-not-UART1-on/m-p...

I still don't understand why the issue can be solved by setting the parity. I tested the communication on my desk where there's almost no noise. So I believe the communication should work with parity bit disabled. Is there an issue in uart communication related to parity bit? Does anyone have idea how it can solve this issue?

[Information]

BOARD: iMXRT1060 EVK

SDK: 2.9.3

TOOL: Modbus Slave from www.modbustools.com

0 Kudos
1 Solution
1,844 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The specification states that when using "no parity" that you use 2 stop bits (Taken from pages 6-7 in Modicon Modbus Protocol Reference Guide PI-MBUS-300 Rev. J).
This is essentially the same as using 1 stop bit with "mark parity".
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
1,845 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The specification states that when using "no parity" that you use 2 stop bits (Taken from pages 6-7 in Modicon Modbus Protocol Reference Guide PI-MBUS-300 Rev. J).
This is essentially the same as using 1 stop bit with "mark parity".
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,834 Views
creatorwonny
Contributor III

Hi @jeremyzhou 

Thanks a lot for the information. I tested communication with setting of non-parity and 2 stop bits, and the communication worked very well. 

0 Kudos