Hello everyone
I have a problem that has not found a solution.
I have an Arduino Nano Every board. I would like to use the WatchDog.
The WDTO_8S command is not recognized! >:(
Error:'WDTO_8S' was not declared in this scope ![]()
While replacing it with WDTO_2S seems to work!
How can I set 8 seconds?
Tanks to all! ![]()
the constant is WDT_PERIOD_8KCLK_gc
if (RSTCTRL.RSTFR & RSTCTRL_WDRF_bm) {
Serial.println(F("It was a watchdog reset."));
}
RSTCTRL.RSTFR |= RSTCTRL_WDRF_bm ;
wdt_enable(WDT_PERIOD_8KCLK_gc);
OK thanks! ![]()
I tried the code and it seems to work!
Why hasn't it been documented in arduino software? : ![]()
AndreaM:
OK thanks!
I tried the code and it seems to work!
Why hasn't it been documented in arduino software? :
because it is a avr-libc thing, not Arduino
Not even avr-libc, but the way it's defined in the hardware specifications.