问题: esp32s3使能light sleep后esp_deep_sleep_start()被timer唤醒

zhongpang
Posts: 4
Joined: Fri Feb 14, 2020 10:24 am

问题: esp32s3使能light sleep后esp_deep_sleep_start()被timer唤醒

Postby zhongpang » Sun Nov 13, 2022 8:26 am

各位大侠好!
最近在开发一个项目时遇到以下问题,esp32s3fn8, 使用的idf版本为5.0 beta1:
1. 系统运行时,启用了light sleep:
esp_pm_config_esp32s3_t pm_config = {
.max_freq_mhz = 80, // e.g. 80, 160, 240
.min_freq_mhz = 10, // e.g. 40
.light_sleep_enable = true, // enable light sleep
};
ESP_ERROR_CHECK( esp_pm_configure(&pm_config) );

2. 系统关机采用了deep sleep,代码如下:
esp_sleep_enable_ext0_wakeup(GPIO_NUM_8, 0);
//Go to sleep now
esp_deep_sleep_start();

问题现象是关机执行esp_deep_sleep_start()后,系统立即重启,通过esp_sleep_get_wakeup_cause() 获取的唤醒原因是 4- ESP_SLEEP_WAKEUP_TIMER.

调试:
1. 将步骤1中的代码去掉,系统关机能正常进入deep sleep.
2. 采用代码在 esp_sleep_enable_ext0_wakeup(GPIO_NUM_8, 0); 前,关闭light sleep, 问题仍然存在.
esp_pm_config_esp32s3_t pm_config = {
.max_freq_mhz = 80, // e.g. 80, 160, 240
.min_freq_mhz = 10, // e.g. 40
.light_sleep_enable = false, // disable light sleep
};
ESP_ERROR_CHECK( esp_pm_configure(&pm_config) );
3. 在menuconfig中,无论以下选项是否启用,问题均重现:
Put lightsleep related codes in internal RAM
Put RTOS IDLE related codes in internal RAM

请各位帮忙分析一下,不胜感谢!

zhongpang
Posts: 4
Joined: Fri Feb 14, 2020 10:24 am

Re: 问题: esp32s3使能light sleep后esp_deep_sleep_start()被timer唤醒

Postby zhongpang » Mon Feb 13, 2023 7:54 am

没人回复……自己顶一下.

Who is online

Users browsing this forum: No registered users and 124 guests