Page 1 of 1

ESP32,light sleep模式唤醒时间长

Posted: Fri Mar 04, 2022 7:17 am
by feiruyun
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 until 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);

Re: ESP32,light sleep模式唤醒时间长

Posted: Mon Mar 07, 2022 8:24 am
by ESP_Da
你是跑的例程有问题?

Re: ESP32,light sleep模式唤醒时间长

Posted: Wed Mar 09, 2022 12:58 pm
by netmark
我是在S3芯片上,遇到了同样的问题,休眠时间长,唤醒时间长,开了WatchDog造成出错,最后查出原因是 esp_timer_start_periodic,开启了定时器,要睡眠之前要关闭,希望乐鑫把这个问题放置到FAQ里面,便于后来者

Re: ESP32,light sleep模式唤醒时间长

Posted: Thu Mar 10, 2022 6:04 am
by ESP_Da
感谢回馈