Other Parts Discussed in Thread: AM3359
Hi,
I am working on AM3359 module mounted on a custom board.Presently 4 OMAP UARTs (48 MHz clock)are being used by our custom application running on linux-3.2 kernel using termios. UARTs are not configured in DMA mode.Also interrupt is generated on every single byte.
It is observed that the UART2 Rx FIFO overrun occurs on two conditions:
1. When UART1 (19200 baud, 8N1) is being used.This UART exchanges modbus packets less than 20 bytes continuously with the application over RS485.
2. When modbus packet of more than 64 bytes is received at UART2 (115200 baud,8N1) over RS232.
3. When UART2 baudrate is 115200 bps. There is no problem at lower baudrates (9600,19200,38400)
Overrun is observed after adding a print in omap-serial.c at below mentioned code snippet present inside "receive_chars()" function.
if (lsr & UART_LSR_OE)
up->port.icount.overrun++;
Kindly Note:
There are two additional patches (Functionality addition from linux-3.8 kernel) applied to linux-3.2 kernel for RS485 UART_DR_PIN control on drivers/tty/serial/omap-serial.c
The Development board used is Phytec Phycore Am335x. BSP is provided by Phytec.
I am using omap2plus_defconfig to build the kernel.
We have also referred to similar issues posted on the TI community/support forums. I have also applied the patch mentioned below:
1. http://lkml.iu.edu/hypermail/linux/kernel/1209.0/02255.html
2. http://lkml.iu.edu/hypermail/linux/kernel/1209.0/02257.html
But we still get the same error at 115200 bps. On further debugging, the following registers and corresponding values were observed:
1. UART_LSR = 0x63 (Signifies that Buffer Overrun has occurred and there is atleast 1 byte in Rx FIFO) (Table 19-48 in AM335x Technical Reference Manual)
2 IIR_UART = 0xc4 (Signifies an interrupt is pending) (Table 19-42 in AM335x Technical Reference Manual)
3. UART_IER = 0x5 (Signifies Rx interrupt is not disabled) (Table 19-35 in Ref Manual)
Please let me know if you need further details (especially related to Pin Mux). I also request you to please help me solve this issue and share missing patches if applicable.
Regards,
Rahul