Arduino Nano Every and WDTO_8S

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 :confused:
While replacing it with WDTO_2S seems to work!
How can I set 8 seconds?
Tanks to all! :slight_smile:

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! :slight_smile:
I tried the code and it seems to work!
Why hasn't it been documented in arduino software? : :slight_smile:

AndreaM:
OK thanks! :slight_smile:
I tried the code and it seems to work!
Why hasn't it been documented in arduino software? : :slight_smile:

because it is a avr-libc thing, not Arduino

Not even avr-libc, but the way it's defined in the hardware specifications.