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
ESP32 I2C speed issue #4595
Comments
Thanks for the report. I guess that |
It was a fun one to find since I have a card with 8 MCP23017 parts which apparently runs just fine at 750KHz but my card with just two MCP23017 parts doesn't. Thanks for the quick response. Is there any way to use the Hardware I2C instead? The ESP32 does support hardware I2C. https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/i2c.html By the way, I love MicroPython. Thank you! |
In 297092a I switched
Not yet, it needs implementing.
Great to hear! |
I'm MicroPython source code beginner, so if I write wrong question, sorry. I wonder why as soft I2C freq sets 400000 ,SCL become 750kHz? Thank you. |
If you read each message in this thread you will see the almost certain reason. The problem was fixed two days ago so you'll need to update your firmware to use the latest daily build. |
@KKawase0104 He had a software loop in there which was processor speed dependent. |
@peterhinch @douggilliland |
As far as I know loboris got the i2c hardware interface integrated, so if someone wants to put some effort in it, it should be easy to backport (I hope) |
See #4914 for hardware I2C on the esp32. |
Hardware I2C for esp32 was implemented it a293347 |
Setting the I2C speed on the I2C for the ESP32 results in seriously different SCL clock rates than the freq parameter.
Setting freq=100000 is close.
Setting freq=200000 is 328 KHz
Setting freq=400000 is 750 KHz.
freq=400000 waveform captured at:
http://land-boards.com/blwiki/index.php?title=ESP32#I2C_Speed
The text was updated successfully, but these errors were encountered: