Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xtensa/esp32: Fix RTC WDT deinitialization on start routine #3975

Merged
merged 2 commits into from Jun 25, 2021

Conversation

gustavonihei
Copy link
Contributor

Summary

This PR intends to fix the RTC WDT deinitialization on the NuttX startup.
Write protection must be disabled before performing changes to the WDT registers. Furthermore, the routine was resetting the wrong field from the RTC WDT register.
The RTC_CNTL_WDT_FLASHBOOT_MOD_EN field relates to Flash Boot Protection and it is enabled by the 1st stage bootloader. The 2nd stage bootloader takes care of disabling it.

Then the 2nd stage bootloader enables the RTC WDT for checking the startup sequence of the application image.

Impact

Now it is now possible to once again enable the RTC WDT on the ESP32 2nd stage bootloader.

Testing

Tested esp32-wrover-kit:nsh with ESP-IDF vanilla 2nd stage bootloader.

Write protection must be disabled before performing changes to the WDT
registers. Furthermore, the routine was resetting the wrong field from
the RTC WDT register.
The RTC_CNTL_WDT_FLASHBOOT_MOD_EN field relates to Flash Boot Protection
and it is enabled by the 1st stage bootloader. The 2nd stage bootloader
takes care of disabling it.
Then the 2nd stage bootloader enables the RTC WDT for checking the
startup sequence of the application image.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
@acassis acassis merged commit db18a12 into apache:master Jun 25, 2021
@gustavonihei gustavonihei deleted the bugfix/esp32_rtc_startup branch June 25, 2021 16:07
@Ouss4 Ouss4 added this to To-Add in Release Notes - 10.2 Oct 11, 2021
@jerpelea jerpelea moved this from To-Add to fixes in Release Notes - 10.2 Oct 13, 2021
@jerpelea jerpelea moved this from fixes to Added in Release Notes - 10.2 Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants