modem sleep

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
seandepagnier
Posts: 15
Joined: Tue Feb 25, 2020 5:10 pm

modem sleep

Post by seandepagnier » Fri Jun 19, 2020 2:22 pm

I have searched the forum and come to the conclusion that light and modem sleep modes are not supported in micropython, is this correct?

I am measuring 150mA power consumption. Looking for a way to get power below 30mA maintaining a wifi connection, but wake on a button press. It takes too long to reboot, and also a while for wifi to reassociate for deep sleep to work.

Is there a way to use lighter sleeps in micropython, and if so, why has it not been implemented when deep sleep support was?


User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: modem sleep

Post by rcolistete » Sun Jun 21, 2020 6:55 am

It seems that the 'esp32-low-power' is a version of MicroPython for ESP332 developed by you , corresponding to different branch of MicroPython source code :
https://github.com/tve/micropython/tree/esp32-low-power

It would be interesting to promote your contributions.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: modem sleep

Post by tve » Sun Jun 21, 2020 7:09 am

You may be misunderstanding the way github works. The link I posted is to the pull request to incorporate the changes I made into the mainline. The changes are made in a branch on my fork, which is the normal way to develop new stuff.
All this being said, the pull request is a bit stalled for a variety of reasons, some of which are in the comments on the pull request. You can also see from the docs that I linked that there are a bunch of caveats due to the way peripherals are clocked if you're using the automatic light-sleep feature. In any case, since no-one has posted any "I want this" comment on the pull request I haven't spent the time to rethink and perhaps iterate on it.

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: modem sleep

Post by rcolistete » Sun Jun 21, 2020 3:47 pm

I've seen your PR. I am just suggesting better promoting your contributions, like in this forum, as they are very useful.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

seandepagnier
Posts: 15
Joined: Tue Feb 25, 2020 5:10 pm

Re: modem sleep

Post by seandepagnier » Mon Jul 06, 2020 2:57 pm

I just got around to trying this out today. I have a few questions:

1) light sleep -- in the source code it's commented out so the parameter to set it is ignored. What exactly is the problem? The rtos ticks too fast? I guess I'm wondering why it can't be used to suspend the processor and wake from various sources.

2) listen interval -- is there a way to dynamically set this or do i have to reconnect to wifi every time to change it?

3) is it possible to put everything one 1 core and depower one core to get lower power consumption?

Post Reply