-
Notifications
You must be signed in to change notification settings - Fork 198
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
calling write_read
with an empty write buffer repeatedly retries I2C reads
#201
Comments
We can get rid of those read attempts by adding |
Just out of curiosity: is this related to your problem using MPU6050? I ordered a MPU6050 break-out board but which should hopefully arrive by the end of the week |
Yes, it was. I added this PR in which originally I was writing an empty, zero length buffer as an attempt to reset any internal state in the I2C peripheral (because IDK what I'm doing lmao) I now write a single |
Can this issue be closed now that #233 has been merged by any chance? |
this problem should be fixed now - will close it |
With this code on an ESP32-C3:
I get this signal trace: repeated.zip
The code panics due to the
NACK
and then suspends execution in a loop inside my panic handler - I have triple checked this with bothprobe-rs
anddefmt
logs. However, even though execution is suspended, the hardware I2C continues to send bogus I2C transmissions. So my only conclusion is that the registers that control the hardware I2C have been left in a state that repeatedly sends incorrect data.Probably, it is due to this code in
esp-hal
:The write command is issued, but the data to write is never actually set because
bytes
is empty.The text was updated successfully, but these errors were encountered: