On newer AVRs, once the watchdog is enabled, then it stays enabled, even after a reset! For these newer AVRs a function needs to be added to the. For these older AVRs, doing a soft reset by enabling the watchdog is easy, as the watchdog will then be disabled after the reset. #include ĬAUTION! Older AVRs will have the watchdog timer disabled on a reset. By using avr/wdt you could easily enable watchdog timer. Instead AVR Libc Reference Manual specifies the usage of watchdog timer for software reset. You should not use goto for software reset, that's bad way. Errors may happen depending on the complexity of your code. Goto 0x00000000 starts the program over but with all SFR not initialized, and the interrupts not initialized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |