Hi.
I'm currently trying to modify the SensorTag workspace in order to add a battery service, but the kit always returns a "0" value as a battery level to my Smartphone. From debugging, I can clearly see that the problem occurs in defining the "adc" in battservice.c file:
DCDC_SBIT = 0;
HalAdcSetReference( HAL_ADC_REF_125V);
adc = HalAdcRead( battServiceAdcCh, HAL_ADC_RESOLUTION_10 );
DCDC_SBIT = 1;
I'm using the "next statement" option in IAR while debugging, and it somehow avoids turning on the DC/DC converter, so the program simply avoids the line: DCDC_SBIT = 1, and "adc" becomes equal to 0 afterwards.
What might be the problem here ?.
Thanks in advance