Automatic light sleep works incorrectly if CONFIG_ESP32_TIME_SYSCALL_USE_RTC is set
Posted: Thu Sep 09, 2021 2:08 pm
Conditions
Chip: ESP32
IDF version: v4.3
Power Management settings:
BLE is on. WiFi is off.
When CONFIG_ESP32_TIME_SYSCALL_USE_RTC is set, I see the following issues
1. ESP is advertising over BLE but cannot connect to it.
2. RTOS generates longer delay with vTaskDelay than I request. When I request 1 second delay I get ~15.
If I set CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1 the problem disappears. I have not found any information in IDF spec about dependency between automatic light sleep and CONFIG_ESP32_TIME_SYSCALL.
Chip: ESP32
IDF version: v4.3
Power Management settings:
Code: Select all
esp_pm_config_esp32_t pm_config =
{
.max_freq_mhz = ESP32_CORE_MAX_SPEED_MHZ,
.min_freq_mhz = ESP32_CORE_MIN_SPEED_MHZ,
.light_sleep_enable = true
};
ESP_ERROR_CHECK(esp_pm_configure(&pm_config));
When CONFIG_ESP32_TIME_SYSCALL_USE_RTC is set, I see the following issues
1. ESP is advertising over BLE but cannot connect to it.
2. RTOS generates longer delay with vTaskDelay than I request. When I request 1 second delay I get ~15.
If I set CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1 the problem disappears. I have not found any information in IDF spec about dependency between automatic light sleep and CONFIG_ESP32_TIME_SYSCALL.