uart communication issue with parity bit disabled

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

uart communication issue with parity bit disabled

ソリューションへジャンプ
2,470件の閲覧回数
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 件の賞賛
返信
1 解決策
2,465件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
2,466件の閲覧回数
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 件の賞賛
返信
2,455件の閲覧回数
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 件の賞賛
返信