Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

TI's MSP432 WDT Example code Error

$
0
0

While debugging my code this weekend I decided to step back and try to debug certain aspects of it. TI's Resource Explorer is a great tool with plenty of example code to look at and review. I was having issues with my WDT routine so I thought I would double check running one of the examples that was released, to be specific, I was interest in the WDT_02 example which can be seen here. The code was not working which really left me wondering since I assumed that any code published BY TI as an example MUST have been checked to see if it actually worked?!

 

Well as it turns out the code does NOT work and has an error in it (actually more than 1). I posted over on TI's e2e forums and for a little detail you can look at that post here.

 

For those that just want to know what is wrong, this line of code:

WDTCTL = WDTIS_4;                    // WDT 250ms, ACLK, interval timer

Needs to be modified to:

WDTCTL = WDTIS_5 | WDTTMSEL | WDTSSEL_1 | WDTCNTCL | WDTPW; // WDT 250ms, ACLK, interval timer

Hopefully the next person left scratching their head wondering what's wrong will find this post and not have to waste time trying to figure out what is going on.


Viewing all articles
Browse latest Browse all 2077

Trending Articles