Page 1 of 1

I2C Pin Location

Posted: Tue Apr 18, 2017 8:23 pm
by kostyan5
Page 49 of the ESP32 data sheet says that I2C pins are 21,22,23,24. However, the I2C example in the SDK uses:

Code: Select all

#define I2C_SLAVE_SCL_IO     26    /*!<gpio number for i2c slave clock  */
#define I2C_SLAVE_SDA_IO     25    /*!<gpio number for i2c slave data */
#define I2C_MASTER_SCL_IO    19    /*!< gpio number for I2C master clock */
#define I2C_MASTER_SDA_IO    18    /*!< gpio number for I2C master data  */
What is the correct location for the I2C pins?

Re: I2C Pin Location

Posted: Tue Apr 18, 2017 9:50 pm
by WiFive
No, it says the RTC I2C pins are 21-24 (gpio 0,2,4,15). The main I2C peripheral goes through the gpio matrix so has no default pins and you are free to choose. Don't confuse qfn package pin # with gpio #. ESP32 has so many features it gets confusing, but that's great!