kopia lustrzana https://github.com/espressif/esp-idf
esp_timer: Fix the stop alarm triggering when the timer list is empty
Related to ESP32-C6 chip only because this chip can power down the digital domain during the light sleep. And after wakes up, systimer gets resumed, and the alarm value < count value, so it leads the alarm fired immediately. We get one unnecessary interrupt at light sleep exit time. Other chips do not power down the digital domain related to systimer.pull/10391/head
rodzic
cee025c003
commit
54b06ecb62
|
@ -80,9 +80,7 @@ void IRAM_ATTR esp_timer_impl_set_alarm_id(uint64_t timestamp, unsigned alarm_id
|
||||||
portENTER_CRITICAL_SAFE(&s_time_update_lock);
|
portENTER_CRITICAL_SAFE(&s_time_update_lock);
|
||||||
timestamp_id[alarm_id] = timestamp;
|
timestamp_id[alarm_id] = timestamp;
|
||||||
timestamp = MIN(timestamp_id[0], timestamp_id[1]);
|
timestamp = MIN(timestamp_id[0], timestamp_id[1]);
|
||||||
if (timestamp != UINT64_MAX) {
|
|
||||||
systimer_hal_set_alarm_target(&systimer_hal, SYSTIMER_LL_ALARM_CLOCK, timestamp);
|
systimer_hal_set_alarm_target(&systimer_hal, SYSTIMER_LL_ALARM_CLOCK, timestamp);
|
||||||
}
|
|
||||||
portEXIT_CRITICAL_SAFE(&s_time_update_lock);
|
portEXIT_CRITICAL_SAFE(&s_time_update_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue