EasyManuals Logo

Texas Instruments MSP430 Student Guide

Texas Instruments MSP430
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #180 background imageLoading...
Page #180 background image
(Optional) Lab 4b Exploring the Watchdog Timer
(Optional) Lab 4b – Exploring the Watchdog Timer
First, a couple of Questions
1. Complete the code needed to enable the Watchdog Timer using ACLK:
WDT_A_watchdogTimerInit( //Initialize the WDT as a watchdog
WDT_A_BASE,
_______________________________________, //Which clock should WDT use?
WDT_A_CLOCKDIVIDER_64 ); //Divide the WDT clock input?
//WDT_A_CLOCKDIVIDER_512 ); //Here are 3 (of 8) different div choices
//WDT_A_CLOCKDIVIDER_32K );
______________________________( WDT_A_BASE ); //Start the watchdog
2. Write the code to ‘kick the dog’? (Or, call it ‘pet’ or ‘feed’ if ‘kick sounds too mean)
The purpose of the watchdog is reset the processor if your code doesn’t reset it before the
count runs out. What driverlib function can you used to reset the timer?
_________________________________________________________________________
Play with last lab exercise
Before we create a new lab exercise, let’s quickly test our old one with regards to the Watchdog.
3. Launch and run the lab_04a_clock project.
If there are any breakpoints set, remove them. Run the program and observe how fast the
LED is blinking. (Ours was blinking about 1/sec.)
4. Terminate the Debugger.
5. Edit the source file by commenting out the Watchdog hold function.
// WDT_A_hold(WDT_A_BASE);
6. Launch the debugger and run the program.
How fast is the LED blinking now? _____________________________________________
(Ours wasn’t blinking at all, after we left the WDT_A running. It must keep resetting the
processor before we even get to the while{} loop.)
7. Close the lab_04a_clock project.
4 - 54 MSP430 Workshop - MSP430 Clocks & Initialization

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals