if my esp32 is connected to wifi before going into deep sleep, is there any advantage to issuing the commands:
esp_wifi_stop();
esp_wifi_deinit();
before
going into deep sleep?
I'm thinking perhaps that may tell the AP that the wifi will no longer be required and save resources there, until the esp wakes up and reconnects - however I'm not sure if the deep sleep stops the wifi and does the deinit anyway?
stopping wifi before going into deep sleep?
Re: stopping wifi before going into deep sleep?
Yes, you should at least esp_wifi_stop. If your IDF version is fairly recent then it will automatically esp_wifi_stop before deep sleep anyway (see esp_register_shutdown_handler).
I would also recommend waiting a moment for the subsequent WIFI_EVENT_[STA/AP]_STOP event to ensure it has actually stopped before sleeping. In the past, I've seen an additional few hundred uA in deep sleep if this isn't given enough time.
I would also recommend waiting a moment for the subsequent WIFI_EVENT_[STA/AP]_STOP event to ensure it has actually stopped before sleeping. In the past, I've seen an additional few hundred uA in deep sleep if this isn't given enough time.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 133 guests