0
votes

I used to use esp8266 with its deep sleep options to wake up with timer and to wakeup with disabled RF like this ESP.deepSleep(TimeInMicro, WAKE_NO_RFCAL); However now I am using esp32. I found how to wake it up with timer but I could not find an option to wakeup with disabled RF. my question is this option possible in esp32 and how to implement that?

Thanks

1

1 Answers

1
votes

From the docs: http://esp-idf.readthedocs.io/en/latest/api-reference/system/sleep_modes.html

WiFi/BT and sleep modes

In deep sleep mode, wireless peripherals are powered down. Before entering sleep mode, applications must disable WiFi and BT using appropriate calls ( esp_bluedroid_disable, esp_bt_controller_disable, esp_wifi_stop).

WiFi can coexist with light sleep mode, allowing the chip to go into light sleep mode when there is no network activity, and waking up the chip from light sleep mode when required. However APIs described in this section can not be used for that purpose. esp_light_sleep_start forces the chip to enter light sleep mode, regardless of whether WiFi is active or not. Automatic entry into light sleep mode, coordinated with WiFi driver, will be supported using a separate set of APIs.

There's a list of all the parameters you can configure with esp_deep_sleep_pd_config prior to entering deep sleep, along with rich information about lots of other deep sleep topics.

For example you can do this sort of thing, exercising a fine degree of control over how your device deep sleeps:

esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_enable_timer_wakeup(((uint64_t) sec) * 60);
esp_deep_sleep_start();