Hugely different deepsleep current consumption with wake_on_ext0 and ext1

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
ellisjr
Posts: 24
Joined: Sun May 17, 2020 8:30 pm

Hugely different deepsleep current consumption with wake_on_ext0 and ext1

Post by ellisjr » Sun Apr 25, 2021 1:34 pm

If I use this code with ext1:

Code: Select all

        
        wu = Pin(34, mode=Pin.IN, pull=Pin.PULL_DOWN)
        esp32.wake_on_ext1(pins = [wu], level = esp32.WAKEUP_ANY_HIGH)
        deepsleep()
I get 5uA consumption on my ESP32 break-out board

If I use this code with ext0:

Code: Select all

        
        wu = Pin(34, mode=Pin.IN, pull=Pin.PULL_DOWN)
        esp32.wake_on_ext0(pin = wu, level = esp32.WAKEUP_ANY_HIGH)
        deepsleep()
I get consumption of 1400uA :o

Have I met (made) some kind of anomaly or have other people seen this? I looked at the code behind wake_on_ext0 and wake_on_ext1 but I couldn't see anything obvious, but I am not a C programmer.

As usual, it's not a showstopper, but I don't like unexplained results. :(

While I am here, I can say that having any touch pin enabled seems to commit one to consumption of 218uA in deep sleep (very disappointing) rising to 226uA with 8 touch pins enabled. Hence looking at wake_on_extX...
John Ellis
What cannot go wrong, will. What definitely cannot go wrong absolutely will... :roll:

Post Reply