imx6UL: permanent serial reception of FF char with parity error.

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

imx6UL: permanent serial reception of FF char with parity error.

ソリューションへジャンプ
1,421件の閲覧回数
jean-françoistr
Contributor II

Hello,
I have a serial communication at 2400 baud 8 Bits parity even of poor quality, and I receive a lot of parity errors. After an undetermined number of parity errors, the processor starts giving without stopping the FF char, with a parity error.
The input hardware signals are at rest. It is as if the receive interrupt flag never returns to 0.

Monitor in function "imx_rxint" of file imx.c

Serial Error.png

OS: Linux 4.14.218
µP : is an imx6ULL
Have you ever encountered this problem?
What can I do to stop it?

Thank you for your help.

0 件の賞賛
返信
1 解決策
1,392件の閲覧回数
jean-françoistr
Contributor II

Hello,

Thank you for your response.
No, I don't use flow control.

I have made progress on understanding and solving the problem.
My communication has a lot of parity error but also the reception of break error.
Here is the result of the ioctl command with the parameter "TIOCGICOUNT".

Serial connexion.PNG

I think µP has a problem under these particular conditions.
Here's the solution I've implemented is one that works. When the number of errors reaches a threshold I do a software reset using the "UCR2_SRST" bit. In the "Part-of_imx.c" file the part of code added.
I have proof that it takes the µP out of this permanent FF sending state in the file "TheProof.txt"

do you think this is the right solution ?

Jean-françois

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,413件の閲覧回数
jamesbone
NXP TechSupport
NXP TechSupport

Did you try to deactivate DEBUG_SERIAL? If the baud rate of your debug output is slow this may cause the errors.

 

0 件の賞賛
返信
1,403件の閲覧回数
jean-françoistr
Contributor II

Hello Jamesbone,
Thank you for your response.

The debug is already disabled in the kernel. Here is the lines of .Config Kernel.

No debug.PNG

Is there another DEBUG to deactivate ?

0 件の賞賛
返信
1,397件の閲覧回数
jamesbone
NXP TechSupport
NXP TechSupport

Do you think you can share some of the code? are you using flow control? becaue in the i.MX6UL there is no signal of flow control in the uart.

 

0 件の賞賛
返信
1,393件の閲覧回数
jean-françoistr
Contributor II

Hello,

Thank you for your response.
No, I don't use flow control.

I have made progress on understanding and solving the problem.
My communication has a lot of parity error but also the reception of break error.
Here is the result of the ioctl command with the parameter "TIOCGICOUNT".

Serial connexion.PNG

I think µP has a problem under these particular conditions.
Here's the solution I've implemented is one that works. When the number of errors reaches a threshold I do a software reset using the "UCR2_SRST" bit. In the "Part-of_imx.c" file the part of code added.
I have proof that it takes the µP out of this permanent FF sending state in the file "TheProof.txt"

do you think this is the right solution ?

Jean-françois

0 件の賞賛
返信
1,376件の閲覧回数
jean-françoistr
Contributor II

Hello JamesBone,
Yes, this software solution fixes the problem.

0 件の賞賛
返信