← index #18961PR #12061
Related · high · value 2.029
QUERY · ISSUE

OpenMV Feature: WDT()

openby kwagyemanopened 2026-03-21updated 2026-03-21
enhancement

Description

WDT working for the STM32, MIMXRT, and Alif on the machine module.

All watchdog types need to work. For example, on the STM32, only the IWDG is implemented right now; however, this watchdog will reset you during deep sleep. There's another watchdog on the STM32 that turns off when in deep sleep.

Code Size

No response

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

esp32/machine_wdt: Allow feeding WDT from threads.

mergedby DvdGiessenopened 2023-07-21updated 2023-07-24
port-esp32

This changes the ESP32 WDT implementation to use a custom handle so that it becomes possible to reset the WDT from a thread.

By default esp_task_wdt_add subscribes the task_id of the current task. That means that if we're running in a different task we are unable to reset the WDT, which prevents feeding the WDT from a thread directly, or even from a timer (which may randomly run in a different task when there's multiple threads).

As an added bonus, the name we set makes the error clearly specify that it was the user-specified WDT that reset the chip:

>>> import machine
>>> machine.WDT(timeout=1)
<WDT>
>>> E (32600) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (32600) task_wdt:  - mpy_machine_wdt

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied