Does anybody knows if this example works with evaluation board SLWSTK6102A? Because I have implemented this and then changed the switch to BAT option but battery service gives me a zero as result.
given example is not working it showing zero value.
how can i debug it while running the board on battery?
From what I read in the reference manual and in the driver code (em_adc.c), the VREFATT setting is used only if the REF field is set to CONF in SINGLECTRL register, which makes it use the extended settings like VREFATT from SINGLECTRLx register.
So I think the above explanation is not valid. Though the eventual VFS=5V, that is correct.
I myself am trying to read battery voltages upto 4.2V (supply voltage = 3.3V) and want to set VINATT=6 so that ATTVIN=0.5 but it is not clear if this is applied only if REF=CONF or for any value of REF.
Can someone help?
I ran the battery-monitor-example on BGM121 using wireless starter kit powered through USB. The expected battery level would be 100%. However, it displayed 0%. Please let me know what could possibly cause it to display 0%.