Power-down of Flash īy default, to avoid potential issues, esp_light_sleep_start() function will not power down flash. This can be overridden using esp_sleep_pd_config() function, if desired. In ESP32-C3, there is only RTC fast memory, so if some variables in the program are marked by RTC_DATA_ATTR, RTC_SLOW_ATTR or RTC_FAST_ATTR attributes, all of them go to RTC fast memory. To override this behaviour, esp_sleep_pd_config() function is provided. Power-down of RTC Peripherals and Memories īy default, esp_deep_sleep_start() and esp_light_sleep_start() functions will power down all RTC power domains which are not needed by the enabled wakeup sources. This means that the external device typically needs to send an extra character to the ESP32-C3 to trigger wakeup before sending the data.Įsp_sleep_enable_uart_wakeup() function can be used to enable this wakeup source. Note that the character which triggers wakeup (and any characters before it) will not be received by the UART after wakeup. This number of positive edges can be set using uart_set_wakeup_threshold() function. The UART peripheral contains a feature which allows waking up the chip from Light-sleep when a certain number of positive edges on RX pin are seen. When ESP32-C3 receives UART input from external devices, it is often necessary to wake up the chip when input data is available. The function will enable the Deep-sleep wakeup for the selected pin. The wakeup pin and wakeup trigger level can be configured by calling esp_deep_sleep_enable_gpio_wakeup(). Then the esp_sleep_enable_gpio_wakeup() function should be called to enable this wakeup source.Īdditionally, IOs that are powered by the VDD3P3_RTC power domain can be used to wake up the chip from Deep-sleep. Each pin can be individually configured to trigger wakeup on high or low level using the gpio_wakeup_enable() function. GPIO Wakeup Īny IO can be used as the external input to wake up the chip from Light-sleep. RTC peripherals or RTC memories don’t need to be powered on during sleep in this wakeup mode.Įsp_sleep_enable_timer_wakeup() function can be used to enable sleep wakeup using a timer. Time is specified at microsecond precision, but the actual resolution depends on the clock source selected for RTC SLOW_CLK. The RTC controller has a built-in timer which can be used to wake up the chip after a predefined amount of time. Wi-Fi and Bluetooth connections will not be maintained in Deep-sleep or Light-sleep mode, even if these functions are not called. 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()). In Deep-sleep and Light-sleep modes, the wireless peripherals are powered down. This will allow the system to wake up from sleep automatically when required by the Wi-Fi driver, thereby maintaining a connection to the AP. If Wi-Fi connections need to be maintained, enable Wi-Fi Modem-sleep mode and automatic Light-sleep feature (see Power Management APIs). At this point, the hardware will be configured according to the requested wakeup sources, and the RTC controller will either power down or power off the CPUs and digital peripherals. Once wakeup sources are configured, the application can enter sleep mode using esp_light_sleep_start() or esp_deep_sleep_start() APIs. Wakeup sources can be configured at any moment before entering Light-sleep or Deep-sleep mode.Īdditionally, the application can force specific powerdown modes for RTC peripherals and RTC memories using esp_sleep_pd_config() API. Next section describes these APIs in detail. Wakeup sources can be enabled using esp_sleep_enable_X_wakeup APIs and can be disabled using esp_sleep_disable_wakeup_source() API. These sources can also be combined so that the chip will wake up when any of the sources are triggered. There are several wakeup sources in Deep-sleep and Light-sleep modes.
0 Comments
Leave a Reply. |