feat(doc): Update the WDT article

Closes https://github.com/espressif/esp-idf/issues/12995
This commit is contained in:
KonstantinKondrashov
2024-01-31 15:19:17 +08:00
committed by BOT
parent afa876fac9
commit c40afaf4ad
4 changed files with 61 additions and 6 deletions
@@ -140,6 +140,29 @@ The following HAL function examples are selected from the Watchdog Timer HAL as
// De-initialize the WDT
void wdt_hal_deinit(wdt_hal_context_t *hal);
.. _hw-abstraction-hal-layer-disable-rtc-wdt:
To disable RTC_WDT
^^^^^^^^^^^^^^^^^^
.. code-block:: c
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_disable(&rtc_wdt_ctx);
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
.. _hw-abstraction-hal-layer-feed-rtc-wdt:
To reset the RTC_WDT counter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: c
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_feed(&rtc_wdt_ctx);
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
HAL functions generally have the following characteristics: