Sam Price started a new discussion on bsps/riscv/esp32/start/bspstart.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161779 > - /* disable super watchdog write protection */ > - RTC_WRITE( RTC_CNTL_SWD_WPROTECT_REG, RTC_CNTL_SWD_WPROTECT_KEY ); > - > - /* Set SWD auto feed */ > + RTC_WRITE( > + RTC_CNTL_WDTCONFIG0_REG, > + wdt_config0 & ~( RTC_CNTL_WDTCONFIG0_EN | RTC_CNTL_WDT_FLASHBOOT_MOD_EN > ) > + ); > + RTC_WRITE( RTC_CNTL_WDTWPROTECT_REG, WDT_WPROTECT_LOCK ); > + > + /* > + * The super watchdog cannot be disabled, only fed. With auto-feed > enabled > + * its controller feeds it without any help from the CPU > + * (section 12.3.2.2). > + */ > + RTC_WRITE( RTC_CNTL_SWD_WPROTECT_REG, RTC_CNTL_SWD_WKEY_VALUE ); **Reference code for the super watchdog auto-feed.** ESP-IDF's C3 bootloader, [`bootloader_super_wdt_auto_feed()`](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/bootloader_support/src/esp32c3/bootloader_esp32c3.c#L74-L79), does the same three writes: key, set `RTC_CNTL_SWD_AUTO_FEED_EN`, then 0. It is [called from the C3 hardware init](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/bootloader_support/src/esp32c3/bootloader_esp32c3.c#L130). Zephyr's no-bootloader path calls the equivalent [`super_wdt_auto_feed()`](https://github.com/zephyrproject-rtos/zephyr/blob/d1b8eec76bfd14058854245d09aa1e413e355c4a/soc/espressif/esp32c3/hw_init.c#L36). -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161779 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-9pwjj8wau0vh24egfat4l0b4d-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
