Does the Light-sleep function disable the wifi radio?
Does the Light-sleep function disable the wifi radio?
According the the specification (see attached table image) current draw during light-sleep should max out at about 2ma. For this low current draw the wifi radio must be disabled. Does this occur as part of the light-sleep function call, or must the wifi radio be disabled prior to calling the light-sleep function.
- Attachments
-
- Sleep-Mode Table.JPG (38.98 KiB) Viewed 3599 times
Re: Does the Light-sleep function disable the wifi radio?
According to the documentation (https://docs.espressif.com/projects/esp ... leep-modes), Wi-Fi and BT should be stopped before calling esp_light_sleep_start.
(Note that there is also an "automatic light sleep" feature which allows maintaining Wi-Fi connection and entering light sleep during the idle periods. It is described in https://docs.espressif.com/projects/esp ... ement.html)
(Note that there is also an "automatic light sleep" feature which allows maintaining Wi-Fi connection and entering light sleep during the idle periods. It is described in https://docs.espressif.com/projects/esp ... ement.html)
Re: Does the Light-sleep function disable the wifi radio?
From the referenced document:
As the first sentence says
Whether you disable or not the connections won't be maintained; the radio is powered down.
The way this reads to me, and the table indicates, just entering light, or deep sleep will power down the radio.
There seems to be some confusion between "powered down" and "disabled".In Deep-sleep and Light-sleep modes, the wireless peripherals are powered down. Before entering Deep-sleep or Light-sleep modes, the application must disable Wi-Fi and Bluetooth using the appropriate calls (i.e., esp_bluedroid_disable(), esp_bt_controller_disable(), esp_wifi_stop()). Wi-Fi and Bluetooth connections will not be maintained in Deep-sleep or Light-sleep mode, even if these functions are not called.
As the first sentence says
Just entering Light-sleep, (or Deep-sleep) will power down the radio, but good practice is to disable the interface, prior to "power down", but as the last sentence saysthe wireless peripherals are powered down
.Wi-Fi and Bluetooth connections will not be maintained in Deep-sleep or Light-sleep mode, even if these functions are not called.
Whether you disable or not the connections won't be maintained; the radio is powered down.
The way this reads to me, and the table indicates, just entering light, or deep sleep will power down the radio.
Re: Does the Light-sleep function disable the wifi radio?
The problem is that if esp_wifi_stop is not called, the connection to the AP would not be shut down gracefully, which may cause issues (slow down) with the subsequent reconnection.
Also some analog circuits in the chip might not be brought into the default state unless esp_wifi_stop is called, which would lead to some amount of leakage after the power-down.
Also some analog circuits in the chip might not be brought into the default state unless esp_wifi_stop is called, which would lead to some amount of leakage after the power-down.
Re: Does the Light-sleep function disable the wifi radio?
It still appears, according to the Espressif spec graceful shutdown should be part of Light-sleep, or Deep-sleep.
As I use microPython, would the equivalent of "esp_wifi_stop" be net.active(false) [where "net" is a user instance of a network object]?
BTW: I'm not actually using wifi connections, I'm using Espressif's ESPNow protocol that does use the wifi radio. The connect/send/response turnaround time is 25ms.
MM
As I use microPython, would the equivalent of "esp_wifi_stop" be net.active(false) [where "net" is a user instance of a network object]?
BTW: I'm not actually using wifi connections, I'm using Espressif's ESPNow protocol that does use the wifi radio. The connect/send/response turnaround time is 25ms.
MM
Who is online
Users browsing this forum: No registered users and 89 guests