BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
lpm.h File Reference

Support for low power mode execution. More...

#include <bsp430/core.h>
#include <msp430.h>

Go to the source code of this file.

Functions

void vBSP430lpmConfigurePortsForLPM_ni (void)
 

Detailed Description

Support for low power mode execution.

SCG1 : Status register bit that, when set, turns off the DCO generator if DCOCLK is not used for MCLK or SMCLK. It is set in LPM modes 2, 3, and 4.

SCG0 : Status register bit that, when set, turns off FLL loop control. It is set in LPM modes 1, 3, and 4.

OSCOFF : Status register bit that, when set, turns off the LFXT1 crystal oscillator when LFXT1CLK is not used for MCLK or SMCLK. It is set in LPM mode 4 and in LPMx.5.

CPUOFF : Status register bit that, when set, turns off the CPU. It is set in all LPM modes.

GIE : Status register bit that, when set, enables maskable interrrupts. It should be set in any LPM mode for which exit is signalled by an interrupt (which is most of them). It may be left set on wakeup if interrupts are normally disabled in the main application.

Homepage
http://github.com/pabigot/bsp430

Function Documentation

void vBSP430lpmConfigurePortsForLPM_ni ( void  )

Reset all port pins for low power applications.

This function should be invoked at application power-up so that only peripheral pins required by the application are in a state that consumes energy. Without doing this, connected pins tend to float and keep the MCU power consumption much higher than it should be.

All digital I/O ports on the MCU (PORTA through PORTJ or their 8-bit equivalents, PORT1 through PORT12) are configured to their i/o function, output direction, and outputs set to zero.

Examples:
bootstrap/applpm/main.c, and bootstrap/lpm/main.c.