mirror of
https://github.com/espressif/esp-idf.git
synced 2026-06-04 20:26:38 +03:00
Merge branch 'bugfix/timg0_disable_v5.0' into 'release/v5.0'
esp_system: Fix TIMG0 still enabled after Timer is freed (v5.0) See merge request espressif/esp-idf!22630
This commit is contained in:
@@ -300,6 +300,15 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
void rtc_clk_select_rtc_slow_clk(void)
|
||||
|
||||
@@ -251,4 +251,13 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
@@ -295,4 +295,13 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
@@ -274,4 +274,13 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
@@ -312,4 +312,13 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
@@ -314,4 +314,13 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
||||
|
||||
/* Enable RNG clock. */
|
||||
periph_module_enable(PERIPH_RNG_MODULE);
|
||||
|
||||
/* Enable TimerGroup 0 clock to ensure its reference counter will never
|
||||
* be decremented to 0 during normal operation and preventing it from
|
||||
* being disabled.
|
||||
* If the TimerGroup 0 clock is disabled and then reenabled, the watchdog
|
||||
* registers (Flashboot protection included) will be reenabled, and some
|
||||
* seconds later, will trigger an unintended reset.
|
||||
*/
|
||||
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ void esp_task_wdt_impl_timer_free(twdt_ctx_t obj)
|
||||
ESP_ERROR_CHECK(esp_intr_disable(ctx->intr_handle));
|
||||
|
||||
/* Disable the Timer Group module */
|
||||
periph_module_enable(TWDT_PERIPH_MODULE);
|
||||
periph_module_disable(TWDT_PERIPH_MODULE);
|
||||
|
||||
/* Deregister interrupt */
|
||||
ESP_ERROR_CHECK(esp_intr_free(ctx->intr_handle));
|
||||
|
||||
Reference in New Issue
Block a user