I try to start wdt by setting in watchdog mode, using 250 msec for generate an interrupt and go to WDT_ISR
But the interrupt never generate.
Q: Can I make wdt interrupt by WDT ISR in watchdog mode?
If yes, how can I use for it.
my some code:
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I try to start wdt by setting in watchdog mode, using 250 msec for generate an interrupt and go to WDT_ISR
But the interrupt never generate.
Q: Can I make wdt interrupt by WDT ISR in watchdog mode?
If yes, how can I use for it.
my some code:
> WDTCTL = WDTPW | WDTTMSEL_0 | WDTCNTCL_1 | WDTIS_5 | WDTSSEL_1; // Start WDT mode, interval timer of 213.33ms, ACLK source
To get Interval Timer mode (timer interrupt, not reset) you need to set WDTTMSEL=1 [Ref User Guide (SLAU445I) Table 12-2]. Try instead:
> WDTCTL = WDTPW | WDTTMSEL_1 | WDTCNTCL_1 | WDTIS_5 | WDTSSEL_1; // Start WDT mode, interval timer of 213.33ms, ACLK source
TI Example msp430fr235x_WDT_02.c does approximately what you want (just leave out the XT1 crystal startup):
https://dev.ti.com/tirex/explore/node?node=AJIG7rj-t2Mxd3GB9fdtBg__IOGqZri__LATEST
--------------
Unsolicited:
> SFRIE1 |= ~WDTIE; // Disable WDT interrupt
This doesn't disable the WDT interrupt. Try instead:
> SFRIE1 &= ~WDTIE; // Disable WDT interrupt
**Attention** This is a public forum