Hi,
I had seen datasheet that CC2640R2F supports inbuilt battery monitor, How can i read the battery status. Please give me suggestions or sample code.
Thanking you,
Vijay Rakesh
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I had seen datasheet that CC2640R2F supports inbuilt battery monitor, How can i read the battery status. Please give me suggestions or sample code.
Thanking you,
Vijay Rakesh
Hi TER,
Thanks for the reply, I'm able to read the voltage powered from system USB but when I try to print in log using %d I'm getting the value as '3' & when I use %f I'm getting 'f' as shown i below. How can i print in float and when try to print percentage i'm getting as 100606 value.
// Code Log_info1("Battery MeasuredVoltage : %d ",MeasuredVoltage); Log_info1("Battery MeasuredVoltage : %f ",MeasuredVoltage); // OUTPUT #000008 [ 0.019 ] [32;1mINFO: [30;1m(project_zero_bds.c:604) [0mBattery MeasuredVoltage : 3 #000009 [ 0.019 ] [32;1mINFO: [30;1m(project_zero_bds.c:605) [0mBattery MeasuredVoltage : f
Regards,
Vijay Rakesh
It is in float format (measuredVolatage) and I had printed using %f format specifier through log_info but it's not printing the value instead it's printing 'f'. Usually in C if use %f float value will be printed.
Regards,
Vijay Rakesh