MSP430 DriverLib for MSP430F5xx_6xx Devices  2.91.13.01
battbak

Functions

uint16_t BattBak_unlockBackupSubSystem (uint16_t baseAddress)
 Unlocks any pending backup input pins and RTC_B interrupts to be serviced. More...
 
void BattBak_enableBackupSupplyToADC (uint16_t baseAddress)
 Enables the backup supply to be measured by the ADC battery monitor input. More...
 
void BattBak_disableBackupSupplyToADC (uint16_t baseAddress)
 Disables the backup supply input to the ADC module. More...
 
void BattBak_switchToBackupSupplyManually (uint16_t baseAddress)
 Manually switches to backup supply. More...
 
void BattBak_disable (uint16_t baseAddress)
 Disables backup battery system. More...
 
void BattBak_initAndEnableCharger (uint16_t baseAddress, uint8_t chargerEndVoltage, uint8_t chargeCurrent)
 Initializes and enables the backup battery charger. More...
 
void BattBak_disableCharger (uint16_t baseAddress)
 Disables and resets backup battery charger settings. More...
 
void BattBak_setBackupRAMData (uint16_t baseAddress, uint8_t backupRAMSelect, uint16_t data)
 Sets data into the selected backup RAM space. More...
 
uint16_t BattBak_getBackupRAMData (uint16_t baseAddress, uint8_t backupRAMSelect)
 Returns the data from the selected backup RAM space. More...
 

Detailed Description

Function Documentation

§ BattBak_disable()

void BattBak_disable ( uint16_t  baseAddress)

Disables backup battery system.

This function disables the battery backup system from being used. The battery backup system is re-enabled after a power cycle.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
None

§ BattBak_disableBackupSupplyToADC()

void BattBak_disableBackupSupplyToADC ( uint16_t  baseAddress)

Disables the backup supply input to the ADC module.

This function disables the ability to monitor the backup supply voltage from the ADC battery monitor input.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
None

§ BattBak_disableCharger()

void BattBak_disableCharger ( uint16_t  baseAddress)

Disables and resets backup battery charger settings.

This function clears all backup battery charger settings and disables it. To re-enable the charger, a call to BattBak_initAndEnableCharger() is required.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
None

§ BattBak_enableBackupSupplyToADC()

void BattBak_enableBackupSupplyToADC ( uint16_t  baseAddress)

Enables the backup supply to be measured by the ADC battery monitor input.

This function enables the backup supply signal to be monitored by the ADC battery supply monitor input, to allow a measurement of the voltage from the backup battery.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
None

§ BattBak_getBackupRAMData()

uint16_t BattBak_getBackupRAMData ( uint16_t  baseAddress,
uint8_t  backupRAMSelect 
)

Returns the data from the selected backup RAM space.

This function returns the 16-bit data currently residing in the selected backup RAM space.

Parameters
baseAddressis the base address of the BATTBAK module.
backupRAMSelectis the backup RAM space to read out from. Valid values are:
  • BATTBAK_RAMSELECT_0
  • BATTBAK_RAMSELECT_1
  • BATTBAK_RAMSELECT_2
  • BATTBAK_RAMSELECT_3
Returns
Data residing in the selected backup RAM space.

§ BattBak_initAndEnableCharger()

void BattBak_initAndEnableCharger ( uint16_t  baseAddress,
uint8_t  chargerEndVoltage,
uint8_t  chargeCurrent 
)

Initializes and enables the backup battery charger.

This function initializes the backup battery charger with the selected settings.

Parameters
baseAddressis the base address of the BATTBAK module.
chargerEndVoltageis the maximum voltage to charge the backup battery to. Valid values are:
  • BATTBAK_CHARGERENDVOLTAGE_VCC - charges backup battery up to Vcc
  • BATTBAK_CHARGERENDVOLTAGE2_7V - charges backup battery up to 2.7V OR up to Vcc if Vcc is less than 2.7V.
    Modified bits are BAKCHVx of BAKCHCTL register.
chargeCurrentis the maximum current to charge the backup battery at. Valid values are:
  • BATTBAK_CHARGECURRENT_5KOHM
  • BATTBAK_CHARGECURRENT_10KOHM
  • BATTBAK_CHARGECURRENT_20KOHM
    Modified bits are BAKCHCx of BAKCHCTL register.
Returns
None

§ BattBak_setBackupRAMData()

void BattBak_setBackupRAMData ( uint16_t  baseAddress,
uint8_t  backupRAMSelect,
uint16_t  data 
)

Sets data into the selected backup RAM space.

This function sets the given 16-bit data into the selected backup RAM space.

Parameters
baseAddressis the base address of the BATTBAK module.
backupRAMSelectis the backup RAM space to set data into. Valid values are:
  • BATTBAK_RAMSELECT_0
  • BATTBAK_RAMSELECT_1
  • BATTBAK_RAMSELECT_2
  • BATTBAK_RAMSELECT_3
datais the data to set into the selected backup RAM space.
Returns
None

§ BattBak_switchToBackupSupplyManually()

void BattBak_switchToBackupSupplyManually ( uint16_t  baseAddress)

Manually switches to backup supply.

This function uses software to manually switch to the backup battery supply. Once this bit is set, it will be automatically reset by a POR and the system returns to an automatic switch to backup supply.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
None

§ BattBak_unlockBackupSubSystem()

uint16_t BattBak_unlockBackupSubSystem ( uint16_t  baseAddress)

Unlocks any pending backup input pins and RTC_B interrupts to be serviced.

This function unlocks the ability to view and service any pending backup input pin interrupts, as well as pending RTC_B interrupts. The backup sub- system can only be unlocked when the backup domain has settled, so this function returns the status of the unlock bit after it has been to be verified by user code. Please note, the backup sub-system should only be unlocked after modifying the RTC_B registers.

Parameters
baseAddressis the base address of the BATTBAK module.
Returns
One of the following:
  • BATTBAK_UNLOCKFAILURE backup system has not yet settled
  • BATTBAK_UNLOCKSUCCESS successfully unlocked
    indicating if the backup system has been successfully unlocked

Copyright 2020, Texas Instruments Incorporated