Hi,
We are currently working on OMAPL138 based product. We need two UARTs,
for these we are using PRU UART. We have configured PRU as follows:
==========================================================================
#define NR_SUART 2
#define SUART_FIFO_LEN 15
#define PRU_ACTIVE SINGLE_PRU
#define SUART_DEFAULT_OVRSMPL SUART_8X_OVRSMPL
#define SUART_DEFAULT_BAUD 230400
#define PRU_SUART1_CONFIG_DUPLEX (PRU_SUART_HALF_TX | PRU_SUART_HALF_RX)
#define PRU_SUART1_CONFIG_RX_SER (PRU_SUART_SERIALIZER_13)
#define PRU_SUART1_CONFIG_TX_SER (PRU_SUART_SERIALIZER_14)
#define PRU_SUART2_CONFIG_DUPLEX (PRU_SUART_HALF_TX | PRU_SUART_HALF_RX)
#define PRU_SUART2_CONFIG_RX_SER (PRU_SUART_SERIALIZER_9)
#define PRU_SUART2_CONFIG_TX_SER (PRU_SUART_SERIALIZER_10)
==========================================================================
When I insert suart_emu.ko module, I got following debug messages:
ti_omapl_pru_suart.1: ttySU0 at MMIO 0x1d00000 (irq = 3) is a suart_tty
ti_omapl_pru_suart.1: ttySU1 at MMIO 0x1d00000 (irq = 4) is a suart_tty
ti_omapl_pru_suart ti_omapl_pru_suart.1: ti_omapl_pru_suart device registered(pru_clk=186000000, asp_clk=150000000)
This PRU UART module creates two node "/dev/ttySU0" and "/dev/ttySU1". We are able to Transmit and Receive data on both UARTs.
We are able to Transmit and Receive file having 10MB size.
In our project, OMAPL138 communicating with Host PC using UART serial
port. Host PC sends caommands(10 to 100 Bytes) to the OMAPL138 over
serial port. OMAPL138 receives command from PRU UART, processes this
commands and sends response(10 to 1000 Bytes) to Host PC using PRU UART.
Now, with 15 FIFO Length, sometimes Host PC receives corrupt data. We
debugged this issue and put debug messages into suart
driver(omapl_pru_tx_chars function). Data are correct and these carrect
data passed to the pru_softuart_write() function. On HOST PC, we have
our own Utility which send/receive command/response on COM port. Same
time, we run Serial Monitor tool to debug this issue. From this tool, we
come to know that response sends by OMAPL138 and data received by COM
port are different. So, Corrupt data are transmitted from OMAPL138 on
PRU UART line.
With same setup, If we change the FIFO Length to 1 then data corruption
is disappear and starts getting correct data. But when OMAPL138 is fully
loaded, sometime we receive CHN_TXRX_STATUS_OVRNERR overrun error and
because of overrun error, serial communication breaks.
We understand that with single FIFO, it is quite possible to get FIFO
overrun error, but why it is not working with 15 FIFO length?
Please help us to resolve this issue.
Thanks and Regards,
Dilip