RTEMS | Draft: bsps/riscv/esp32: Disable the watchdogs bsp_start() means to disable (!1555)
Sam Price (@TheSamPrice)
gitlab at rtems.org
Tue Nov 3 05:21:31 UTC 2026
Sam Price started a new discussion on bsps/riscv/esp32/start/bspstart.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161781
> + /*
> + * Timer group 0's watchdog follows the same procedure as the RTC watchdog,
> + * with its own key register. Its configuration registers are updated
> + * asynchronously, so the change only takes effect once
> + * TIMG_WDT_CONF_UPDATE_EN is written (register 11.10).
> + */
> + TIMG_WRITE( TIMG_WDTWPROTECT_REG, WDT_WKEY_VALUE );
> timg_wdtconfig0 = TIMG_READ( TIMG_WDTCONFIG0_REG );
> - TIMG_WRITE( TIMG_WDTCONFIG0_REG, timg_wdtconfig0 & TIMG_WDTCONFIG0_EN );
> + TIMG_WRITE(
> + TIMG_WDTCONFIG0_REG,
> + timg_wdtconfig0 & ~( TIMG_WDTCONFIG0_EN | TIMG_WDT_FLASHBOOT_MOD_EN )
> + );
> + TIMG_WRITE(
> + TIMG_WDTCONFIG0_REG,
> + TIMG_READ( TIMG_WDTCONFIG0_REG ) | TIMG_WDT_CONF_UPDATE_EN
**Reference code for `TIMG_WDT_CONF_UPDATE_EN`.** ESP-IDF's [`mwdt_ll_set_flashboot_en()`](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/esp_hal_wdt/esp32c3/include/hal/mwdt_ll.h#L190-L195) clears `wdt_flashboot_mod_en` and then sets `wdt_conf_update_en = 1`, with the comment "Config registers are updated asynchronously". Every other `TIMG_WDTCONFIG0` setter in that file does the same (for example [L122](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/esp_hal_wdt/esp32c3/include/hal/mwdt_ll.h#L122) and [L177](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/esp_hal_wdt/esp32c3/include/hal/mwdt_ll.h#L177)).
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161781
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-6yevla21tk43o126mqalvjtss-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261103/952c2a63/attachment-0001.htm>
More information about the bugs
mailing list