arduino / arduino/ArduinoCore-renesas

Wire clock is slow for some 3.3V devices.

Open
#69 18 comments 0 reactions 0 assignees View on GitHub
topic: code type: imperfection
Dominant language
C
Stars
193
Forks
112
PR merge metrics
No merged PRs in 30d

Description

The RA4M1 I2C controller runs slower than the selected clock rate for some 3.3V devices. These devices run at the full rate on Uno R3.

I have had no problems with 5V devices. All 5V devices I have tried run at 400kHz.

I looked for any issues for RA4M1 on the Renesas site. It seems the controller is very fussy for 3.3V devices. Devices fail if powered by slightly less than 3.3V and Renesas states:

> For the functioning of IIC Slave on all the boards except for EK-RA6M3/EK-RA6M3G,FPB-RA6E1,external pull up resistors of value 3.9 or 4.7k ohms are required to be connected on I2C(SDA/SCL) lines.

Here is an example with a SSD1306 128 x 64 OLED display which has 4.7 K pullups to 3.3V.

On a R4 Minima I get 329kHz for 400kHz requested clock. I get 95kHz for 100 kHz requested clock.

I added an analog trace for SCL.

![R4_3V](https://github.com/arduino/ArduinoCore-renesas/assets/3964207/98b7cf60-a6f9-42a3-830d-33d08722342f)

For the same program and device on Uno R3 I get exactly 400 kHz.:

![R3_3V](https://github.com/arduino/ArduinoCore-renesas/assets/3964207/c05211cc-929d-47c1-b501-54484fbecc28)

Any Ideas what is causing 3.3V devices to run a bit slower on R4?

I have not tried more than one I2C device at a time on R4.

Edit: Are internal pullups enabled on R4?

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file, test, or entry point is named. Reproduce the reported SSD1306 measurements on the R4 Minima at requested 100 kHz and 400 kHz, then trace the RA4M1 I2C clock configuration and compare it with the Uno R3 result. Done means identifying why 3.3V devices run below the selected rate and documenting or correcting the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.