Other Parts Discussed in Thread: CC1310
Tool/software: TI-RTOS
I am working with cc1310
I need to monitor the battery in mV
My code is,
int get_bat_status(void)
{
uint32_t bat_volt;
float bat_status=100.0;
if(AONBatMonNewBatteryMeasureReady()) {
bat_volt = AONBatMonBatteryVoltageGet();
bat_status = ( ((bat_volt>>8)&0x7)*1000 + (bat_volt&0xFF)*1000/256 );
}else{
bat_status=0.0;
}
return((int)(bat_status));
}
I have included library
#include <driverlib/aon_batmon.h>
but this function returns a value of 3.32mV, when i am usin a 2.9V battery.
I have found that battery monitor is checking the VDD supply.
How can i get the accurate value of battery voltage.
In which ADC battery monitor is connected?
Please help me.