Sam Price started a new discussion on bsps/riscv/esp32/start/bspstart.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161776

 > + *
 > + *   Register 9.37, RTC_CNTL_WDTWPROTECT_REG (0x00A8), page 254:
 > + *   "RTC_CNTL_WDT_WKEY If the register contains a different value than
 > + *   0x50d83aa1, write protection for the RTC watchdog (RWDT) is enabled."
 > + */
 > +#define WDT_WKEY_VALUE 0x50d83aa1U
 >  
 > -#define RTC_CNTL_WDTCONFIG0_REG (uintptr_t) 0x90
 > -#define RTC_CNTL_WDTCONFIG0_EN  BSP_BIT32( 31 )
 > +/*
 > + * Section 12.2.2.3, Write Protection, page 309, step 3:
 > + *
 > + *   "Re-enable write protection by writing any value other than 0x50D83AA1
 > + *   to the timer's write-key field."
 > + */
 > +#define WDT_WPROTECT_LOCK 0U

**Reference code for locking.** ESP-IDF also writes 0 to lock again: 
[`mwdt_ll_write_protect_enable()`](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/esp_hal_wdt/esp32c3/include/hal/mwdt_ll.h#L231-L234)
 for the timer group watchdog and 
[`rwdt_ll_write_protect_enable()`](https://github.com/espressif/esp-idf/blob/0e6b480f858c69862ffb6001d96e9eef74599a6e/components/esp_hal_wdt/esp32c3/include/hal/rwdt_ll.h#L273-L276)
 for the RTC watchdog.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1555#note_161776
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-20zroevgdw18k37v78ocb29rb-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

Reply via email to