Holding a GPIO pin during deep sleep

gritnix
Posts: 2
Joined: Mon Dec 16, 2019 2:56 pm

Holding a GPIO pin during deep sleep

Postby gritnix » Mon Dec 16, 2019 3:04 pm

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.

gritnix
Posts: 2
Joined: Mon Dec 16, 2019 2:56 pm

Re: Holding a GPIO pin during deep sleep

Postby gritnix » Tue Dec 17, 2019 12:09 pm

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.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: Holding a GPIO pin during deep sleep

Postby chegewara » Wed Dec 18, 2019 8:30 pm

Use external pull down resistor.

commando_j
Posts: 27
Joined: Tue Feb 05, 2019 5:26 pm

Re: Holding a GPIO pin during deep sleep

Postby commando_j » Wed Dec 18, 2019 8:55 pm

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?

Who is online

Users browsing this forum: JK Sleepling and 116 guests