Dual UART with I2C-bus/SPI interface SC16IS752/SC16IS762 IC.

Hello!

I have a question concerning SC16IS752/SC16IS762 IC.

It is a UART expander via SPI.

I have a problem with it.

I configured IC so that every time, it has receive data in buffer,

IC generates interrupt. Then, I read Receive Holding Register (RHR) and get data.

Unfortunately, after some time of operation, IC stops generating interrupts…

I read out from the Data Sheet that there is some magic in TCR and TLR registers…

I tried to do workaround by I still have no result…

Does somebody have some experience with it? Perfectly, if with esp32.

What can be the issue and how I can resolve it.

ioexp_set_prescaller(u, IOEXP_PRESCALER_1);

ioexp_uart_set_baudrate(u, config->uart.baudrate);
ioexp_uart_set_word_length(u, config->uart.word_length);
ioexp_uart_set_parity(u, config->uart.parity);
ioexp_uart_set_stop_bits(u, config->uart.stop_bits);

//to get aceess to TLR and TCR
ioexp_register_write(IOEXP_REG_MCR, u, 0x04);
ioexp_register_write(IOEXP_REG_EFR, u, 0x10);
ioexp_register_write(IOEXP_REG_TCR, u, 0x0F);//4-bytes - resume, 60bytes - halt
ioexp_register_write(IOEXP_REG_TLR, u, 0x10);//trigger - 4 bytes
ioexp_register_write(IOEXP_REG_FCR, u, 0x01);//fifo enable
ioexp_register_write(IOEXP_REG_EFR, u, 0x00);// no flow control!!
ioexp_register_write(IOEXP_REG_EFCR, u, 0); // Enable TX and RX
ioexp_register_write(IOEXP_REG_IER, u, 0x01); // RHR Interrupts enabled