Skip to content

Commit 2ae8a44

Browse files
authored
Merge pull request #4325 from microDev1/fix-wdt
ESP32S2: Fix watchdog deinit
2 parents 627c5f5 + 13453d3 commit 2ae8a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/esp32s2/common-hal/watchdog/WatchDogTimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
4949
}
5050

5151
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
52-
if (esp_task_wdt_deinit() == ESP_OK) {
52+
if (esp_task_wdt_delete(NULL) == ESP_OK && esp_task_wdt_deinit() == ESP_OK) {
5353
self->mode = WATCHDOGMODE_NONE;
5454
}
5555
}

0 commit comments

Comments
 (0)