Open robertinant opened 8 years ago
I think we should stick this into a library. MSP430 currently (ab)uses the watchdog timer as an interval timer to keep track of millis/micros.
That would be a great idea. For EMT-based projects, it is easy. The question is more about non-EMT projects.
See the example and discussion for the CC3200 at http://forum.43oh.com/topic/9346-cc3200-watchdog/
Not sure it works on the MSP432.
The only caveat is the WDT_IF_DeInit()
function doesn't seem to deactivate the watchdog.
From @rei-vilo on December 6, 2015 17:39
Implement watchdog for the boards supported by EMT.
HAL is provided by
Energia.app/Contents/Resources/Java/hardware/emt/ti/drivers/Watchdog.h
.Unlike the other RTOS elements proved in the Galaxia library, each platform has watchdog-related specifics under the
Energia.app/Contents/Resources/Java/hardware/emt/ti/drivers/watchdog folder
.WatchdogCC26XX.h
WatchdogCC3200.h
WatchdogMSP430.h
WatchdogMSP432.h
WatchdogTiva.h
Copied from original issue: energia/Energia#782