Skip to content

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

Merged
jessebraham merged 1 commit into
masterfrom
bugfix/disable-rtc-wdg-on-connect
Apr 27, 2022
Merged

Hack to disable the rtc watchdog when connecting under the usb-serial-jtag#169
jessebraham merged 1 commit into
masterfrom
bugfix/disable-rtc-wdg-on-connect

Conversation

@MabezDev
Copy link
Copy Markdown
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
@MabezDev MabezDev requested a review from jessebraham April 27, 2022 08:13
Copy link
Copy Markdown
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