AUX pin state for ESP32 host deep sleep

We are using the outboard DFU feature as described in the [Notecard Outboard Firmware Update - Blues Wireless Developers] and wanted to confirm that this is not going to cause phantom power consumption issues.

It appears the ESP32xx MCUs have varied and sometimes not fully documented behavior when it concerns gpio state in deep sleep modes, especially concerning the strapping pins connected in the hardware dfu scheme. We wanted to confirm exactly what AUX3, AUX4, AUXRX, AUXTX on the notecard side are doing at the hardware level, are they always high-impedance until dfu is initiated? Can this be configured? Or should we add an io buffer between the host and the notecard to guarantee that there will be no leakage? We see mention of adding a mux to be controlled with AUX1, is this the safest approach?

Hi @jascha,

If the RX/TX are dedicated to the Notecard for Outboard Firmware Update, the easiest thing is to add TXS0104EQPWRQ1 (or equivalent level shifter) that you explicitly use OE to truly isolate your RX (U0RXD) / TX (U0TXD) / BOOT (IO0) / RESET (EN) when you are in deep sleep mode. One way of doing this is to use one of the esp32’s RTC gpio pins to control the OE, and do this just before you go into deep sleep which will pull that pin (and thus OE) down, and then set it high when you’re active.

rtc_gpio_init(pin);
rtc_gpio_set_direction(pin, RTC_GPIO_MODE_OUTPUT_ONLY);
rtc_gpio_set_direction_in_sleep(pin, RTC_GPIO_MODE_OUTPUT_ONLY);
rtc_gpio_set_level(pin, 0);

If you are using the rx/tx for something else, yes you can also add a mux (we use DG273DN-T1-E4 because of low current) controlled by AUX1. But the task of isolating during your deep sleep is different than the task of mux’ing the use of RXTX. (We do this kind of thing in multiple projects.)

Hope that helps!