AnsweredAssumed Answered

SC16IS740 I2C configuration

Question asked by buol on Sep 21, 2017
Latest reply on Oct 27, 2017 by buol

Hello,

 

I am trying to use the SC16IS740 chip in order to read a periodically & single-character sending UART device via I2C from an embedded linux module. In a first step I would just like to read the characters manually using i2ctools, without interrupts or FIFO. However, I'm not sure if I do the configuration correctly.

 

UART specification: Baud 9600, 8bit word lengt, no parity, 1 stop bit
Crystal: 1.8432MHz

Configuration sequence:
i2cset -y 2 0x4d 0x18 0x80   # LCR - access special registers
i2cset -y 2 0x4d 0x00 0x0C   # DLL - divisor 0x000C (12) to get baud 9600
i2cset -y 2 0x4d 0x08 0x00   # DLH - divisor 0x000C (12) to get baud 9600
i2cset -y 2 0x4d 0x18 0x03   # LCR - access general registers, set config 8N1
i2cset -y 2 0x4d 0x10 0x00   # FCR - disable FIFO (default..)
i2cset -y 2 0x4d 0x08 0x00   # IER - disable interrupts(default..)
(note: register addresses are shifted by one compared to the datasheet)

By now I think I should be able to read the character sent by my UART device in the RHR register and see the LSR[0] flag set. However, RHR is constantly at 0x04 and the LSR[0] flag cleared.

Am I missing something in my configuration sequence so far or am I probably facing a hardware issue?

Thanks for every advice
Oliver

Outcomes