← index #2635Issue #4964
Off-topic · high · value 0.268
QUERY · ISSUE

stmhal: WDT hangs after programming

openby dhylandsopened 2016-11-14updated 2024-08-28
bugport-stm32

I discovered an interesting quirk related to the IWDG.

If I program my pyboard using pydfu, then trying this in the REPL immediately afterwards hangs:

>>> wdt = machine.WDT(0, 5000)

By hangs, I mean it never returns the REPL. I added some debug prints and it seems to stuck in the IWDG->SR & 1 loop and the value of SR is 3.

If I hit the RESET button, then the wdt = machine.WDT(0, 5000) works exactly as expected.

CANDIDATE · ISSUE

Initial a WDT with timeout param, but it seem like useless?

closedby walklinewangopened 2019-07-31updated 2019-08-01
port-esp32

I am running some code in a new thread using While True. I feed the WDT every 2 seconds in this loop, but after the timeout period set by the WDT, the device will restart. I don't understand, I need a watch dog. But what I got is a timed restart device?

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