-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Hardware I2C fail on ESP32_C3 - timing value error #7772
Comments
This error also occurs with MicroPython v1.18 on a LILYGO T-01C3. Here is an example of the error occuring in the REPL:
As can be seen, the error message The following call to micropython/ports/esp32/machine_i2c.c Line 74 in da4b38e
The function prototype for esp_err_t i2c_set_timeout(i2c_port_t i2c_num, int timeout); However, the semantics of the On an ESP32, On an ESP32C3, the number of APB clock cycles that need to occur before the timeout expires is 2 ** timeout. The |
This caused me issues because the clock was running too fast for my target. I found setting freq=50000 configured I2C with a frequency of 100000 which was a satisfactory work around until addressed. |
I've encountered this error on the ESP32-S3-DevKitC-1 as well:
|
There are various reported issues with ESP32-S3 and ESP32-C3 in esp-idf. Some have been fixed, but only just recently, and some fixes are not yet in a release. For instance, we (CircuitPython) are seeing problems with at least one sensor that's using clock stretching on S3: espressif/esp-idf#8894. |
Until this is fixed, you can use |
I have the opposite experience.
output:
fyi : tested on Lilygo T-OI Plus V1.2 board |
I believe I have figured out the issue. See this PR: #9434 |
Should be fixed by 12f9948 |
struct: Check that argument counts match, similar to cpython3
bro try it. I solved problem |
Hardware I2C fails on ESP32_C3 with i2c timing value error.
i2c=I2C(0, scl=Pin(5), sda=Pin(4))
fails with error
E (87717) i2c: i2c_set_timeout(783): i2c timing value error.
Hardware: Lilygo T-OI Plus V1.0 ESP32-C3 (revision 3)
SoftI2C instantiates, but I2C does not recognise stop condition
Micropython:
Version v1.17-20-g0a5107372
Compiled on RPi 4 with idf4.3
Same MicroPython compiled for ESP32 or ESP32_S2 successfully instantiates i2c
--Barry
The text was updated successfully, but these errors were encountered: