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?
modem sleep
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: modem sleep
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 :tve wrote: ↑Sat Jun 20, 2020 4:51 amhttps://github.com/micropython/micropython/pull/5473
https://micropython-tve.readthedocs.io/ ... 2-lowpower
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).
Re: modem sleep
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.
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.
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: modem sleep
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).
-
- Posts: 15
- Joined: Tue Feb 25, 2020 5:10 pm
Re: modem sleep
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?
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?