I2C Timeout Issue on ESP32 DevKitC_V4 with ESP-IDF (Works Fine with Arduino Framework)
Posted: Thu Dec 12, 2024 2:59 pm
I am encountering an issue with I2C communication while using ESP-IDF v5.3.1 on my ESP32 DevKitC_V4 board. Specifically, I receive timeout errors when trying to detect an Adafruit BNO055 breakout board (address 0x28) using the i2c-tools template. I haven't had any issues with other breakout boards I've tried (e.g. bmp180, bme280, mpu6050).
Setup Details:
When running the i2cdetect tool provided in the ESP-IDF template, I encounter the following errors:
The same hardware setup works without any issues when using the Arduino framework (Wire library) to communicate with the BNO055 breakout board.
Setup Details:
- ESP-IDF Version: v5.3.1
- ESP32 Board: DevKitC_V4
- I2C Pins:
- SDA: GPIO 21
- SCL: GPIO 22
- I2C Clock Speed: 100 kHz
- Pull-Up Resistors:
- Internal pull-ups enabled.
- External pull-up resistors (4.7kΩ) added to SDA and SCL lines.
- Slave Device: Adafruit BNO055 Breakout Board (I2C address: 0x28)
When running the i2cdetect tool provided in the ESP-IDF template, I encounter the following errors:
Code: Select all
E (9705) i2c.master: I2C transaction timeout detected
E (9705) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up
UU I (9715) gpio: GPIO[21]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0
I (9725) gpio: GPIO[22]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0
E (9735) i2c.master: I2C hardware timeout detected
E (9745) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up