mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(esp_timer): fix isr safe when CONFIG_FREERTOS_USE_TICKLESS_IDLE and PM_ENABLE
This commit is contained in:
parent
ef7406257a
commit
2f9456bf51
@ -979,6 +979,7 @@ esp_err_t spi_bus_free(spi_host_device_t host_id)
|
||||
sleep_retention_module_deinit(retention_id);
|
||||
}
|
||||
_lock_release(&ctx->mutex);
|
||||
_lock_close(&ctx->mutex);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
|
@ -222,11 +222,11 @@ static void IRAM_ATTR timer_alarm_isr(void *arg)
|
||||
|
||||
void IRAM_ATTR esp_timer_impl_update_apb_freq(uint32_t apb_ticks_per_us)
|
||||
{
|
||||
portENTER_CRITICAL(&s_time_update_lock);
|
||||
portENTER_CRITICAL_SAFE(&s_time_update_lock);
|
||||
assert(apb_ticks_per_us >= 3 && "divider value too low");
|
||||
assert(apb_ticks_per_us % TICKS_PER_US == 0 && "APB frequency (in MHz) should be divisible by TICK_PER_US");
|
||||
REG_SET_FIELD(CONFIG_REG, TIMG_LACT_DIVIDER, apb_ticks_per_us / TICKS_PER_US);
|
||||
portEXIT_CRITICAL(&s_time_update_lock);
|
||||
portEXIT_CRITICAL_SAFE(&s_time_update_lock);
|
||||
}
|
||||
|
||||
void esp_timer_impl_set(uint64_t new_us)
|
||||
|
Loading…
x
Reference in New Issue
Block a user