Watchdog timer for ATTiny1614 does not work for 4S and 8S #1073
BenthamITServices
started this conversation in
Library discussion
Replies: 1 comment 2 replies
-
|
Hi! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
wdt_enable() works for all timeouts from WDTO_15MS to WDTO_2S but if WDTO_4S or WDTO_8S is used the Arduino IDE 2.3.2 produces the following error messages:
In file included from E:\Users\Steven\Documents\GitHub\Arduino_2\ATTiny1614\Blink_LED_on_PA2\Blink_LED_on_PA2.ino:3:0:
E:\Users\Steven\Documents\GitHub\Arduino_2\ATTiny1614\Blink_LED_on_PA2\Blink_LED_on_PA2.ino: In function 'void setup()':
E:\Users\Steven\Documents\GitHub\Arduino_2\ATTiny1614\Blink_LED_on_PA2\Blink_LED_on_PA2.ino:49:14: error: 'WDTO_4S' was not declared in this scope
wdt_enable(WDTO_4S);
^
E:\Users\Steven\Documents\GitHub\Arduino_2\ATTiny1614\Blink_LED_on_PA2\Blink_LED_on_PA2.ino:49:14: note: suggested alternative: 'WDTO_2S'
exit status 1
Compilation error: 'WDTO_4S' was not declared in this scope
I can set the watchdog timer to 4S or 8S using the following code:
const uint8_t reset_timeout = 0xA; //or 0xB
wdt_enable(reset_timeout);
Beta Was this translation helpful? Give feedback.
All reactions