ESP32,进入light sleep模式后,通过GPIO唤醒,唤醒时间长,并且,休眠时间越长,唤醒时间也越长。
请教各位大佬,这是怎么回事?代码如下:
Code:
Select all
esp_sleep_enable_gpio_wakeup();
/* To make sure the complete line is printed before entering sleep mode,
* need to wait un
til UART TX FIFO is empty:
*/
uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
int64_t sleep_start = esp_timer_get_time();
/* Enter sleep mode */
esp_light_sleep_start();
/* Get timestamp before entering sleep */
LOG_INFO_TAG("K", "T: %lld", esp_timer_get_time() - sleep_start);