8.9.1. On-Chip Voltage Sensor (TI MSP430) 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. Resources 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. 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.