11/2/2023 0 Comments Starting watch dog initialization![]() ![]() use the following 4 lines to kick the dog WDOG_PRESC = 0 // This sets prescale clock so that the watchdog timer ticks at 1kHZ instead of the default 1kHZ/4 = 200 HZ This is the value that the watchdog timer compare itself to. WDOG_TOVALL = 1000 // The next 2 lines sets the time-out value. ![]() WDOG_STCTRLH_WAITEN | WDOG_STCTRLH_STOPEN | WDOG_STCTRLH_CLKSRC // Enable WDG WDOG_STCTRLH |= WDOG_STCTRLH_ALLOWUPDATE | WDOG_STCTRLH_WDOGEN | the following code should be placed at the end of setup() since the watchdog starts right after thisÄelayMicroseconds(1) // Need to wait a bit. I'm trying to set up a watchdog timer on the teensy but it wont trigger the interrupt for some reason when I get stuck in a loop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |