mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Merge branch 'bugfix/freertos_critical_section_compliance' into 'master'
Changes in uart and esp_timer for critical section compliance with vanilla FreeRTOS See merge request espressif/esp-idf!6733
This commit is contained in:
@@ -222,7 +222,7 @@ uint64_t IRAM_ATTR esp_timer_impl_get_time(void)
|
||||
|
||||
void IRAM_ATTR esp_timer_impl_set_alarm(uint64_t timestamp)
|
||||
{
|
||||
portENTER_CRITICAL(&s_time_update_lock);
|
||||
portENTER_CRITICAL_SAFE(&s_time_update_lock);
|
||||
// Alarm time relative to the moment when counter was 0
|
||||
uint64_t time_after_timebase_us = timestamp - s_time_base_us;
|
||||
// Adjust current time if overflow has happened
|
||||
@@ -252,7 +252,7 @@ void IRAM_ATTR esp_timer_impl_set_alarm(uint64_t timestamp)
|
||||
alarm_reg_val = (uint32_t) compare_val;
|
||||
}
|
||||
REG_WRITE(FRC_TIMER_ALARM_REG(1), alarm_reg_val);
|
||||
portEXIT_CRITICAL(&s_time_update_lock);
|
||||
portEXIT_CRITICAL_SAFE(&s_time_update_lock);
|
||||
}
|
||||
|
||||
static void IRAM_ATTR timer_alarm_isr(void *arg)
|
||||
|
Reference in New Issue
Block a user