AnsweredAssumed Answered

iMX536 UART5 Linux driver interrupt handler delayed

Question asked by Vyacheslav Matyushin on Aug 10, 2015

Hi!

I have a RSB4210 board (i.MX536) from Advantech running Linux 2.6.35.3.

I am reading data from UART5 at 460800 bit/s.

I have issues similar to those described at https://community.freescale.com/thread/357233

I can't just take latest freescale 2.6.35.11 kernel from git because it requires some RSB4210-specific changes.

So I have disabled DMA - set #define UART5_DMA_ENABLE 0 at arch/arm/mach-mx5/serial.h.

 

This improved the result, but the problem remains:

I constantly read data from UART5, but sometimes overruns occur and data gets corrupted.

This happens few times a second but if CPU load increases it happens more frequently.

Overrun counter "oe:" keeps increasing in /proc/tty/driver/ttymxc.

 

I looked into drivers/serial/mxc_uart.c and found the following detail.

mxcuart_int() does all work and is called constantly with 100-200 microsecond intervals (depending on UART5_UFCR_RXTL threshold).

But sometimes next mxcuart_int() call happens in 5 milliseconds after its previous call.

In this situation driver detects overrun and increases "oe" counter.

 

I have turned off Ethernet but overruns still occur.

What can periodically delay mxcuart_int() call for 5 milliseconds?

Eliminating that could probably fix my issue.

 

Thanks,

Vyacheslav.

Outcomes