Marking parity errors on iMX6DL serial port

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

Marking parity errors on iMX6DL serial port

跳至解决方案
1,291 次查看
IanCraig
Contributor II

Hi

We want to be able to pass characters that have parity errors received on the UART to our application using the PARMRK termios flag. We were able to do this on kernel 3.0.35  after modifying the interrupt routine to pass the characters up if an error is detected, they were being masked before. However we have moved to 3.14.28 and this now doesn't work, even after putting in our interrupt routine patch. Any characters with a parity error are not passed up to our application and changing termios flags makes no difference.

I have found  that 3.14.28 uses DMA, which doesn't use the UART serial interrupt routine. 3.0.35 didn't use DMA. If I disable DMA to force the driver to use the serial interrupt routine everything works as expected again.

We want to keep DMA enabled so is there anyway to have the PARMRK termios flag work correctly when the UART's are using DMA?

Thanks

Ian

标签 (2)
0 项奖励
回复
1 解答
1,151 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  

  In UART driver description regarding Driver Features :
"
Recognizes frame and parity errors only in interrupt-driven mode; does not recognize

these errors in DMA-driven mode".

  You may try to use UART Parity Error Interrupt in Interrupt Service :

Enable it in UART Control Register 3 (UARTx_UCR3), PARERREN.

 

Have a great day,

Yuri

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct

Answer button. Thank you!

------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,152 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  

  In UART driver description regarding Driver Features :
"
Recognizes frame and parity errors only in interrupt-driven mode; does not recognize

these errors in DMA-driven mode".

  You may try to use UART Parity Error Interrupt in Interrupt Service :

Enable it in UART Control Register 3 (UARTx_UCR3), PARERREN.

 

Have a great day,

Yuri

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct

Answer button. Thank you!

------------------------------------------------------------------------------

0 项奖励
回复