From 2a2bd0f8ff9424c4739c3d245a28d032953b1f22 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Thu, 23 Feb 2023 08:59:59 -0300 Subject: [PATCH] esp_system: Fix TIMG0 still enabled after Timer is freed Signed-off-by: Gustavo Henrique Nihei --- components/esp_system/task_wdt/task_wdt_impl_timergroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_system/task_wdt/task_wdt_impl_timergroup.c b/components/esp_system/task_wdt/task_wdt_impl_timergroup.c index c7cfa0c5b9..2414004fa4 100644 --- a/components/esp_system/task_wdt/task_wdt_impl_timergroup.c +++ b/components/esp_system/task_wdt/task_wdt_impl_timergroup.c @@ -106,7 +106,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));