8.9.1. On-Chip Voltage Sensor (TI MSP430)

8.9.1.1. Introduction

The MSP430G2955 has a built-in Vcc sensor. It is useful particularly when running from a battery source. This can tell us when the battery needs to be replaced.

8.9.1.2. Resources

8.9.1.3. Platform Integration

The sensor can be enabled by defining compile-time flag PLTFRM_ON_CHIP_VCC_SENSE_ENA. An example of using this sensor is illustrated in App Examples.

8.9.1.3.1. Functions

void pltfrm_vccSenseInit(void)

Initializes the on-chip voltage sensor.

UINT32_t pltfrm_vccSense(void)

Obtains the Vcc value (battery voltage) from the on-chip sensor.

Returns:Voltage value is return as millivolts.