Page 1 of 1

Flashing fails with I2C connected on certain ports

Posted: Sun Jun 18, 2017 8:00 am
by parsec
Hi all, new ESP32 user here.

I have a DevKitC board with a BME280 (SparkFun BoB) connected on I2C. When the sensor SDA/SCL is wired to GPIO 15 and 2 flashing ('make flash') will timeout with A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header.

If I instead use e.g. GPIO 32 and 33 it works fine.

I narrowed it down further to GPIO 2, disconnected this pin will result in successful flashing.

After flashing has completed and GPIO 2 reconnected to the sensor the I2C communication works reliably.

I looked at the docs/pinouts in order to try to understand what is special with GPIO 2 but can't really find anything relevant. So if anyone know what kind of magic this is and would care to enlighten me I'd be very thankful.

Re: Flashing fails with I2C connected on certain ports

Posted: Sun Jun 18, 2017 11:35 am
by ESP_igrr
Please check the strapping pin list at the end of ESP32 Chip Pin List document. GPIO2 must be low in order to enter UART download mode. This pin has a weak pulldown enabled at reset, but if you attach I2C bus, 10k pullup will drive the pin high.