Satbir Sekhon

SC16IS740 SPI TLR Interrupt

Discussion created by Satbir Sekhon on Jul 11, 2017
Latest reply on Aug 21, 2017 by Satbir Sekhon

Hello All,


I am trying to get an interrupt when 4 characters have been received by the SPI to UART bridge, and I do get an interrupt on the IRQ pin, but the interrupt source is always Time Out 0xCC, in IIR, instead of 0xC4. 


Following code is used to set the UART Bridge. 


SPI_Write (0x03, 0x80); // LCR 0x80 to program baud rate
SPI_Write (0x00, 0x0D); // DLL 0xD = 9600 with X1=2 MHz
SPI_Write (0x01, 0x00); // DLH divisor = 0xD for 9600 BPS

SPI_Write (0x03, 0xBF); // LCR access EFR register
SPI_Write (0x02, 0x10); // EFR enable enhanced registers EFR[4] = 1
SPI_Write (0x04, 0x04); // MCR enable TLR registers MCR[2] = 1
SPI_Write (0x07, 0x10); // TLR RX interrupt Trigger Level Set to 4 Characters
SPI_Write (0x04, 0x00); // MCR Disable TLR registers MCR = 0

SPI_Write (0x03, 0x00); // LCR Clear LCR

SPI_Write (0x03, 0x03); // LCR 8 data bit, 1 stop bit, no parity
SPI_Write (0x01, 0x01); // IER Enable RX Interrupt

SPI_Write (0x02, 0x06); // FCR reset TXFIFO, reset RXFIFO, non FIFO mode
SPI_Write (0x02, 0x01); // FCR enable FIFO mode


It interrupts correctly if I send 8 characters. 


Please advice if this is even possible or what am I doing wrong?