Skip to content

Instantly share code, notes, and snippets.

@ciniml
Created August 6, 2024 13:47
Show Gist options
  • Save ciniml/4e2c1bd444a899c165efef1db1c74c8d to your computer and use it in GitHub Desktop.
Save ciniml/4e2c1bd444a899c165efef1db1c74c8d to your computer and use it in GitHub Desktop.
Disable Chip WDT for ESP32-C3/S3
#include "hal/wdt_hal.h"
static void disable_chip_wdt(void) {
wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL};
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_disable(&rtc_wdt_ctx);
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment