Page 1 of 1

Holding a GPIO pin during deep sleep

Posted: Mon Dec 16, 2019 3:04 pm
by gritnix
Hello,

Programming a board with the Arduino IDE, I need to keep a couple pins low during deep sleep (GPIO_NUM_5 and 33). I've found that I need to call gpio_deep_sleep_hold_en() in order to achieve this, but when I do that, my current goes from 21uA during deep sleep (I'm using a dev board) to 270uA during deep sleep. Is this expected, that holding the GPIO state turns on something else that just burns 10x the power?

Thanks.

Re: Holding a GPIO pin during deep sleep

Posted: Tue Dec 17, 2019 12:09 pm
by gritnix
One other thing. One of the pins I need to hold low during deep sleep is GPIO_NUM_33. Feels like that shouldn't be a big deal, but the this pin wants to sit at around 0.15V even after being set low during the code and even after I use the gpio_deep_sleep_hold_en() call before sleeping. The pin will be at ground during the code since I set it there, and then as soon as the core sleeps, it goes up to that ~0.15V. Any advice there would also be greatly appreciated. Thanks again.

Re: Holding a GPIO pin during deep sleep

Posted: Wed Dec 18, 2019 8:30 pm
by chegewara
Use external pull down resistor.

Re: Holding a GPIO pin during deep sleep

Posted: Wed Dec 18, 2019 8:55 pm
by commando_j
With nothing connected to the pin,

- Internal Pull-down value: ~45K
- Your Vcc: 3.3V (?)
= 73uA per pin

Depending on the external circuitry hooked to those pins, it could increase the current drain as well.

The 45K pull-down is average, it can vary a lot.

Can you share the general connection to each pin?