Skip to content

Instantly share code, notes, and snippets.

@ciniml
Created August 6, 2024 13:47

Revisions

  1. ciniml created this gist Aug 6, 2024.
    8 changes: 8 additions & 0 deletions disable_chip_wdt.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #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);
    }