Functions | |
static void | AONBatMonEnable (void) |
Enable the temperature and battery monitoring. More... | |
static void | AONBatMonDisable (void) |
Disable the temperature and battery monitoring. More... | |
int32_t | AONBatMonTemperatureGetDegC (void) |
Get the current temperature measurement as a signed value in Deg Celsius. More... | |
static uint32_t | AONBatMonBatteryVoltageGet (void) |
Get the battery monitor measurement. More... | |
static bool | AONBatMonNewBatteryMeasureReady (void) |
Check if battery monitor measurement has changed. More... | |
static bool | AONBatMonNewTempMeasureReady (void) |
Check if temperature monitor measurement has changed. More... | |
|
inlinestatic |
Get the battery monitor measurement.
This function will return the current battery monitor measurement. The battery voltage measurements are updated every cycle.
|
inlinestatic |
|
inlinestatic |
Enable the temperature and battery monitoring.
This function will enable the measurements of the temperature and the battery voltage.
To speed up the measurement of the levels the measurement can be enabled before configuring the battery and temperature settings. When all of the AON_BATMON registers are configured, the calculation of the voltage and temperature values can be enabled (the measurement will now take effect/propagate to other blocks).
It is possible to enable both at the same time, after the AON_BATMON registers are configured, but then the first values will be ready at a later point compared to the scenario above.
|
inlinestatic |
Check if battery monitor measurement has changed.
This function checks if a new battery monitor value is available. If the measurement value has changed since last clear the function returns true
.
If the measurement has changed the function will automatically clear the status bit.
true
if the measurement value has changed and false
otherwise.
|
inlinestatic |
Check if temperature monitor measurement has changed.
This function checks if a new temperature value is available. If the measurement value has changed since last clear the function returns true
.
If the measurement has changed the function will automatically clear the status bit.
true
if the measurement value has changed and false
otherwise.int32_t AONBatMonTemperatureGetDegC | ( | void | ) |
Get the current temperature measurement as a signed value in Deg Celsius.
This function returns an calibrated and rounded value in degree Celsius. The temperature measurements are updated every cycle.
Referenced by AONBatMonDisable(), OSCHF_GetStartupTime(), OSCHF_SwitchToRcOscTurnOffXosc(), and SysCtrlSetRechargeBeforePowerDown().