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

Hack to disable the rtc watchdog when connecting under the usb-serial-jtag #169

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

MabezDev
Copy link
Member

@MabezDev MabezDev commented Apr 26, 2022

When the chip is reset via the USB-SERIAL-JTAG not everything is fully reset, the RTC domain stays active. Therefore, if the RTC watchdog is enabled before being put into download mode it will trigger when flashing, hence resetting the board and interrupting flashing.

The reason it always works on Arduino is that the RTC watchdog is explicitly disabled very early on in the boot process which doesn't seem to be the case for normal esp-idf applications, and therefore Rust applications.

Closes #154

When the chip is reset via the USB-SERIAL-JTAG not everything is fully
reset, the RTC domain stays active. Therefore, if the RTC watchdog is
enabled before being put into download mode it will trigger when
flashing, hence resetting the board and interrupting flashing.
@MabezDev MabezDev force-pushed the bugfix/disable-rtc-wdg-on-connect branch from ed1b004 to 1c8cad0 Compare April 27, 2022 08:07
@MabezDev MabezDev marked this pull request as ready for review April 27, 2022 08:13
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jessebraham jessebraham merged commit 544f700 into master Apr 27, 2022
@jessebraham jessebraham deleted the bugfix/disable-rtc-wdg-on-connect branch September 15, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken pipe error on ESP32-C3 for "large" applications
2 participants