Skip to content

ESP32S2: Support for WatchDog #3667

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

Merged
merged 3 commits into from
Nov 16, 2020
Merged

ESP32S2: Support for WatchDog #3667

merged 3 commits into from
Nov 16, 2020

Conversation

microdev1
Copy link
Collaborator

No description provided.

@tannewt
Copy link
Member

tannewt commented Nov 10, 2020

cc @astrobokonon

@microdev1
Copy link
Collaborator Author

microdev1 commented Nov 10, 2020

from microcontroller import watchdog as w
from watchdog import WatchDogMode
import time

# Set a timeout of 5 seconds
w.timeout = 5
w.mode = WatchDogMode.RESET

# Increasing time.sleep(>5) causes a watchdog reset
while True:
    w.feed()
    time.sleep(2)

tannewt
tannewt previously approved these changes Nov 12, 2020
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Is there more you want to add?

@microdev1
Copy link
Collaborator Author

@tannewt Yes... I have to figure out a way to differentiate between RAISE & RESET modes in esp_task_wdt_isr_user_handler(void) which is called on watchdog interrupt.

@microdev1 microdev1 marked this pull request as ready for review November 14, 2020 06:14
@microdev1 microdev1 requested a review from tannewt November 14, 2020 06:14
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you!

@tannewt tannewt merged commit 66fb095 into adafruit:main Nov 16, 2020
@microdev1 microdev1 deleted the watchdog-s2 branch November 18, 2020 07:07
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.

2 participants