Hi
I have a simple project with this IC.
I just configured the product to work as I2C - UART.
But when I write in the THR register, I expect the TXLVL register needs to show some number related to number of spaces available. But this register is always with the same number.
I am using a Raspberry to send the I2C commands, and I read all related documentation and follow the order of the commands this forum suggests but I am not having success.
"""
self.bus.write_byte_data(self.DEVICE_ADDRESS, LCR, 0x80)
# Set DLL
self.bus.write_byte_data(self.DEVICE_ADDRESS, DLL, 0x78)
# Set DLH
self.bus.write_byte_data(self.DEVICE_ADDRESS, DLM, 0x00)
print("Set 0xBF")self.bus.write_byte_data(self.DEVICE_ADDRESS, LCR, 0xBF)
# EFR only can be accessed with LCR = 0xBF
# EFR[4] --> enable enhanced functions
self.bus.write_byte_data(self.DEVICE_ADDRESS, EFR, 0x10)
# 8 data bit, 1 stop bit, no parity
self.bus.write_byte_data(self.DEVICE_ADDRESS, LCR, 0x03)
# FCR: 0 0 1 0 0 1 1 1
self.bus.write_byte_data(self.DEVICE_ADDRESS, FCR, 0x27)
"""
Log of execution:
Line Status LSR (hex): 0x60
Modem status MSR (hex): 0x0
TXLVL (hex): 0x40
RXLVL (hex): 0x0
Writing DATA to THR: 0xfa
Reading DATA (hex) from RHR: 0x19
Line Status LSR (hex): 0x60
Modem status MSR (hex): 0x0
TXLVL (hex): 0x40
RXLVL (hex): 0x0
Writing DATA to THR: 0xfb
Reading DATA (hex) from RHR: 0x19
Line Status LSR (hex): 0x60
Modem status MSR (hex): 0x0
TXLVL (hex): 0x40
RXLVL (hex): 0x0
As you see, there is no changes in the Status or Tx/Rrx registers.
Do you have some idea of how to debug this?
I saw TX pin is always high. But the configuration is OK.
Regards