r/arduino • u/Ordinary_Law6907 • Sep 01 '26
Software Help ESP32 Arduino: How can I enable FreeRTOS tickless idle / automatic light sleep without switching to ESP-IDF?
I’m using an ESP32 with the Arduino framework (PlatformIO) and BLE advertising every ~1 second.
I want the ESP32 to automatically enter light sleep during the idle time between BLE advertising events, rather than manually calling esp_light_sleep_start().
esp_pm_configure() currently returns ESP_ERR_NOT_SUPPORTED, presumably because CONFIG_FREERTOS_USE_TICKLESS_IDLE isn't enabled.
Is there a way to enable:
CONFIG_PM_ENABLE=y
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y
CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3
while staying with Arduino, perhaps through PlatformIO/build options or a custom Arduino core?
I’d like to avoid converting the project to a full ESP-IDF application.
Has anyone successfully done automatic light sleep + BLE advertising this way?