I've designed a custom ESP32 board around the WROVER-IE module. To keep power low, I'm using a GPIO-controlled high-side FET to turn off unused peripherals when in deep sleep mode.
The issue: I've pulled up an SSD1306 I2C OLED to this AUX rail. It works great when the device is awake. On setup() I start the OLED via ssd1306.begin() and from that point on, the SCL and SDA pins (22, 21) are always tied to 3.3V until I reset the ESP32.
The I2C bus always being tied to 3.3 ends up bleeding through the pull-up resistors and into the AUX rail, resulting unwanted current draw when in sleep mode.
Is there any way to turn off the internal I2C pullups on the ESP32?
Things I've tried so far:
- Setting SDA, SCL as OUTPUT and writing LOW (does not work)
- Setting SDA, SCL as INPUT and/or writing LOW (does nothing)
- Calling
gpio_hold_dis(gpio_num_t(SDA));
(does nothing)
I'm now trying to dissect the esp32-hal-i2c.c lib but am not finding any fixes. Any help is greatly appreciated!
-N