Skip to content

Commit

Permalink
Merge branch 'bugfix/esp_timer_disable_alarms' into 'master'
Browse files Browse the repository at this point in the history
esp_timer: Fix the stop alarm triggering when the timer list is empty

Closes IDF-5323

See merge request espressif/esp-idf!21114
  • Loading branch information
KonstantinKondrashov committed Nov 22, 2022
2 parents 54d9da9 + 54b06ec commit 167d5ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/esp_timer/src/esp_timer_impl_systimer.c
Expand Up @@ -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);
timestamp_id[alarm_id] = timestamp;
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);
}

Expand Down

0 comments on commit 167d5ae

Please sign in to comment.