Other Initialization (WDT, PMM)
Other Initialization (WDT, PMM)
When starting up a system, there are a number of elements that must be initialized. Here’s a
generic summary detailing these items.
Step
Required
Action?
Who is
Responsible
Where
Discussed
Initialize the stack pointer (SP)
usually OFF when debugging)
Yes User Chapter 4
Setup Power Manager & Supervisors
Reconfigure clocks (if desired)
No User
Chapter 4
(earlier)
Configure peripheral modules
The Stack Pointer must be initialized but the compiler does this for us, which is why we don’t
directly discuss this in this workshop.
As discussed many times already in this workshop, since the Watchdog Timer defaults to “ON”,
it must be configured. During development and debugging we usually turn it off. The next section
discusses the Watchdog in further detail.
Some of the more feature-rich series of the MSP430 devices contain an on-chip LDO along with
Power Manager and Supervisor circuitry. If these features exist on your chosen device, you will
probably want to configure them. This is discussed later in this chapter.
In the last chapter we discussed and used GPIO pins (general purpose bit I/O). It highly
recommended that you configure all GPIO pins on your device. Obviously, those being used need
to be configured, but you should also configure those pins not in use so as to minimize power
dissipation.
Earlier in this chapter we discussed the many, varied clock options for the MSP430 devices.
Unless the default clock options are exactly what you need for your system, these need to be
configured.
Finally, you will need to setup and configure the remaining peripherals that will be used in your
application. We won’t try to list them all here – and they vary based upon the selected device –
but this is usually handled in main() before starting your while{} loop.
4 - 32 MSP430 Workshop - MSP430 Clocks & Initialization