linux SC16IS752 driver,Receive Line Status error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

linux SC16IS752 driver,Receive Line Status error

2,068 Views
fq1110
Contributor I

Dear All,

I use the LPC3250 + SC16IS752, the SPI interface to expand two serial ports,OSC 11059200,SPI speed 4M, but now I am having problems, when the peripheral sends a large amount of data, far beyond the FIFO 64 bytes, at this time,  will receive the following error.
overrun error has occurred(LSR register)
Receive Line Status error(IIR register)
Specific kernel debugging information is as follows:

sc16is7x2 spi0.0: sc16is7x2_read_status ier=0x07 iir=0xc1 msr=0x00 lsr=0x60
sc16is7x2 spi0.0: sc16is7x2_handle_channel finished
sc16is7x2 spi0.0: sc16is7x2_handle_channel (0) irq ts=0xc3a00c00
sc16is7x2 spi0.0: sc16is7x2_read_status ier=0x07 iir=0xc6 msr=0x00 lsr=0x63
sc16is7x2 spi0.0: sc16is7x2_handle_rx (0) 64 bytes
sc16is7x2 spi0.0: +CWLAP:(3,"android",-36,"b0:d5:9d:81:10:27",11,-42,0)
+CWLAP:(2                                          (Lost some of the data here)
sc16is7x2 spi0.0: sc16is7x2_read_status ier=0x07 iir=0xc6 msr=0x00 lsr=0x63
sc16is7x2 spi0.0: sc16is7x2_handle_rx (0) 64 bytes
sc16is7x2 spi0.0: +CWLAP:(4,"重庆新赛亚二楼1",-75,"34:96:72:9c:e3:a8",1,-31
sc16is7x2 spi0.0: sc16is7x2_read_status ier=0x07 iir=0xc1 msr=0x00 lsr=0x60
sc16is7x2 spi0.0: sc16is7x2_handle_channel finished

..........................

The overall format of the data received should be as follows

+CWLAP:(3,"android",-36,"b0:d5:9d:81:10:27",11,-42,0)
+CWLAP:(2,"TEST",-21,"xx:xx:xx:xx:xx:xx",xx,xx,0)

+CWLAP:(4,"重庆新赛亚二楼1",-75,"34:96:72:9c:e3:a8",1,-31,0)


Does anyone encounter the same problem? How to fix this problem by modifying the driver?

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

1,291 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi,

The SC16IS752 could be connected by SPI or I2C, therefore, SPI/I2C drivers should be used in the middle of the communication with the SC16IS752 part.

You could take a look at the following link for a Linux implementation:

https://github.com/torvalds/linux/blob/master/drivers/tty/serial/sc16is7xx.c

Additionally, the links below provides bare-metal implementations, that helps to understand the SC16IS752 functionality:

https://community.nxp.com/docs/DOC-335332

https://www.nxp.com/docs/en/application-note/AN10587.pdf


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply