-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C master: Read data does not match actually present on bus. #3034
Comments
If I lower the frequency to 50 kHz, the data is read correctly. It seems to be a hardware issue. May be it needs some configuration for input filters, but seems it still hasn't supported. |
Thanks for reporting this! Just to confirm, the wavefor doesn't change in a meaningful way when you look at it, right? |
Can you please check if #3040 solves your issue? |
@katyo Interested to follow this. Just making sure you know about potential problems if using all these together:
The problem is that If you don't use |
This is only an issue if you use anything RTT-based, like defmt, but not true in general. I'm not sure if the I2C peripheral would be affected by this, though... |
Hmm.. so I likely should change the writing in the link I made. I'll try! For me, I2C was indeed affected; that's why I brought this up. But it only occurred because my VL53L5CX peripheral takes a longish (>64kB) transfer, to upload its firmware. |
Bug description
The data in read buffer does not match data which slave writes to the bus. For example it reads
0x83
while on a bus I see the0xC3
, it reads0x03
while on a bus0x83
is present.I deals with a
ESP32-C3
. I use the defaultI2C
config withSCL
on aGPIO3
,SDA
on aGPIO4
. The hardware pull-ups is a 4.7K both. If that matter the slave device is a relative humidity and temperature sensorHTU21D
.Looks like the 7th and 6th bits changes randomly.
To Reproduce
I use the following code snippet:
I tried both blocking and async modes with same results. I'm on a main
esp-hal
branch.UPD:
Also I tried optimized (release) build but the problem is same.
Expected behavior
Read data same as an actually present on a bus.
Environment
esp-hal v0.23.1
The text was updated successfully, but these errors were encountered: