0

I am using Maniacbug Mighyty-1284p 16MHz in my project. Here I used watchdog for safety.I used three command for watchdog.

1. wdt_enable(WDTO_8S);
2. wdt_reset();
3. wdt_disable();

Is it create any problem if I use "wdt_enable(WDTO_8S);" command two times (one after another without using wdt_disable();)

  • 1
    no. it only sets the registers. and the reason for setting it twice is? – Juraj May 23 '18 at 6:43
  • @Juraj besides setting the registers, it also resets the watchdog timer if it is running. Still not an issue for the OP. Calling it twice is fine. – Gerben May 23 '18 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.