I'm running KW2xD board on batteries.
I'd like to measure main voltage to monitor batteries discharge level.
Is there a way to measure the main voltage with KW2xD's ADC and without additionnalkw components ?
Hello Olivier Fauchon,
There is an ADC channel (AD27) connected to an internal Bandgap voltage reference of 1V that you can measure and then use to estimate your main voltage. This is assuming that your main voltage is also used as your ADC reference voltage (VREFH).
After enabling bangap with PMC_REGSC[BGBE], I could read AD27 value (v)
Real voltage (in mV) is obtained with simple convertion V=(1024*1000/v)
Retrieving data ...