WIO Terminal as dev board RTL8720DN - I2C Timeout & IO Error

Hi everyone, thanks for checking out this topic!

I’m currently trying to use the WIO Terminal as development board for the realtek chip to be able to flash, and monitor the code I’ve written. The problem I’m facing is related to the I2C bus. The WIO Terminal is connected to an extern RTL8720DN which is connected on a PCB. All connections have been checked, and seem to work. The uploads, flashing and monitoring works.

The problem I’m facing appears while communicating as slave on the I2CBus. In the test I’m trying to set up an simple I2C master/ slave bus, where a simple Pi or Arduino is the master, and the realtek chip is the slave.

Raspbian (on the Pi 4) shows me the i2c adress which I’ve programmed for the realtek chip. This seems all fine. But when I’m trying to read the I2C adress with a simple Python script, I’m receiving the error:

OSError: [Errno 5] Input/output error
TimeoutError: [Errno 110] Connection timed out

When this happens, the bus is starting to get really low (seems like clock stretching).
i2cdetect -y 1 (on the Pi 4) takes ages, and doesn’t see any device on the bus anymore.
This keeps being slow, untill i restart the chip (turning on/ off the wifi terminal which powers the chip).

I’ve checked the SDK’s and some forum posts, but it seems that the 8722DM (where the arduino lib is written for), uses the same sdk as the 8720dn. Which means that the 8720dn (which I’m using) should be compatible with the provided librarires which are making use of the Wire.h for I2C communication.

I’ve also checked if the master (Pi) can read the data as expected. When attaching an Arduino, the Pi receives the signal, which translates to a working Master/ receiving side.

Has any of you faced this problem? And what could it be?

  • Does it has something to do with Clock Stretching? Could this be the case happening on the realtek chip?
  • Does the arduino Wire.h library not support the 8720DN chip?
  • Could there be a difference in pull up resistors? (!= 1.8k)

Thanks for your time!

Links/ Sources: