I have a program which uses the delay(int) function for timing.
It works fine UNTIL I need to stop the watchdog timer to perform more precise timing by setting WDTCTL = WDTPW + WDTHOLD as per multiple examples.
After I have turned it off I run some timing tests that work.
However now my delay(int) command hangs the system and it won't recover.
I've tried every setting I can think of (including turning on the watch dog timer in multiple different ways) but I can't get the delay function to work again after turning off the watch dog timer.
What registers need to be set to restore the watch dog timer to default (power on) operation? Based on the register map it sure seems like WDTCTL = WDTPW should be all that's needed unless there are defaults that are not documented.