Jump to content
GeorgeIoak

TI's MSP432 WDT Example code Error

Recommended Posts

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...