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 #166 background imageLoading...
Page #166 background image
Other Initialization (WDT, PMM)
Initialization Summary (template)
To some of you the following template may seem obvious, but we thought it might be handy to
provide a template, of sorts, for a main() function in an MSP430 program.
Summary: Initializing MSP430
#include <driverlib.h>
void main(void) {
// Setup/Hold Watchdog Timer (WDT+ or WDT_A)
initWatchdog();
// Configure Power Manager and Supervisors (PMM)
initPowerMgmt();
// Configure GPIO ports/pins
initGPIO();
// Setup Clocking: ACLK, SMCLK, MCLK (BCS+, UCS, or CS)
initClocks();
//----------------------------------------------------------
// Then, configure any other required peripherals and GPIO
...
while(1) {
...
}
}
Notice that there are function calls provided for many of the initialization steps discussed in this
chapter. Of course, it’s up to you to provide the necessary code for each of these functions. The
following lab exercises will provide some examples of these functions which we’ll continue to
build upon in future chapters.
4 - 40 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