Watchdog timer not resetting esp32 board

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
crcibernetica
 
Posts: 58
Joined: Fri Apr 11, 2014 6:59 pm

Watchdog timer not resetting esp32 board

Post by crcibernetica »

Firmware: Adafruit CircuitPython 8.0.0-beta.4 on ESP32

WatchDogMode.RAISE does work correctly. There is an exception raised if I hold down the "kill switch" for more than 10 seconds. However, WatchDogMode.RESET does nothing that I can see.

Code: Select all

import board
from digitalio import DigitalInOut
from microcontroller import watchdog as w
from watchdog import WatchDogMode
import time

# Kill switch -- normally high
button = DigitalInOut(board.IO4)

w.timeout = 10.0
w.mode = WatchDogMode.RAISE

while True:
    w.feed()
    while button.value == 0:
        pass

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Watchdog timer not resetting esp32 board

Post by mikeysklar »

You have a simple reproducible chunk of code. Do you mind contributing to the existing issue that has been opened on the CircuitPython github repo?

https://github.com/adafruit/circuitpython/issues/5757

The above issue is M4 based on CP 7.x, but related to what you see that WatchDogMode.RESET is not working as expected.

User avatar
crcibernetica
 
Posts: 58
Joined: Fri Apr 11, 2014 6:59 pm

Re: Watchdog timer not resetting esp32 board

Post by crcibernetica »

It doesn't appear to be the same issue. Before creating a new issue I wanted to understand if RESET simply hasn't been implemented on the ESP32 or if I am doing something wrong.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Watchdog timer not resetting esp32 board

Post by mikeysklar »

There is a deinit fix that confirms ESP32 WatchDogMode.RESET is in place.

https://github.com/adafruit/circuitpython/pull/4325
https://github.com/adafruit/circuitpython/issues/4324

Creating a new issue makes sense in your case.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”