Hi !
I can see significant changes in example lpadc_temperature_measurement and would like to understand better what there are.
1. For what reason need this line:
/* set BOD VBAT level to 1.65V */
POWER_SetBodVbatLevel(kPOWER_BodVbatLevel1650mv, kPOWER_BodHystLevel50mv, false);
What is relation with temperature measurement ?
2. New comment recommend to limit input frequency to 6Mhz.
/* Maximum advised frequency for temperature sensor measurement is 6MHz whether the source is XTAL or FRO.
I'm using FROH source and div 8 and have clock 12 Mhz.
How critical this recommendation ?
In case of crystal-less clocking this is only possible clock for ADC.
3. What about new configuration parameter ?
lpadcConfigStruct.powerLevelMode = kLPADC_PowerLevelAlt4;
How it effect to Power management ?
In my case I wakeup from PowerDown mode periodically, fully reinitialize ADC and take temperature measurement.
4. What can be ADC settings for execute as fast conversion as possible ?
With example settings:
g_LpadcCommandConfigStruct.sampleTimeMode = kLPADC_SampleTimeADCK131;
g_LpadcCommandConfigStruct.hardwareAverageMode = kLPADC_HardwareAverageCount128;
Initialization and get first sample take ~7 ms what is too long.
And I have disabled skip of 2 first inaccurate values already.
Shorter average show almost random result and some accurate and fast values are need to be "calculated."
There are should be stable in wide temperature range of MCU usage,
Regards,
Eugene