diff --git a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp index 5106e59c55..84254b7cc0 100644 --- a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp +++ b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp @@ -143,7 +143,9 @@ class TimerConfig timer_ll_get_counter_value(dev, index, &val); return val; #else +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0) timer_ll_trigger_soft_capture(dev, index); +#endif return timer_ll_get_counter_value(dev, index); #endif }