Hi !
1.
I can see in lpadc_temperature measurement example you divide main clock to 16
CLOCK_SetClkDiv(kCLOCK_DivAdcAsyncClk, 16U, true);
CLOCK_AttachClk(kMAIN_CLK_to_ADC_CLK);
But the same divisor can't be more than 8 if I use ConfigTool what is part of MCUExpresso IDE.
SDK and IDE have latest versions.
2. I have put MCU to PowerDown mode sometimes.
Do I understand right and I should reinitialize ADC in full way like in this SDK example ?
And even skip 2 nonstable values of temperature after initialization.
Does BIAS have sense to keep running when I go to PowerDown mode ?
What can be right ( and minimal) ADC re initialization sequence after PowerDown mode ?
Regards,
Eugene
Hi, Eugene,
Regarding the ADC clock divider, this is a right configuration:
CLOCK_SetClkDiv(kCLOCK_DivAdcAsyncClk, 8U, true);
From the screenshot, you can see the divider is set up as 7.
but it is okay to use the line also:
CLOCK_SetClkDiv(kCLOCK_DivAdcAsyncClk, 16U, true);
Because the divider is written with 15, only 3 last bits can be written, so the divider is also 7. I have tested.
Regarding the ADC module after power-down, during power down mode, the ADC is turned off, so after waking-up, you have to reinitialize the ADC so that it can function.
Hope it can help you.
BR
XiangJun Rong
Hi xiangjun.rong !
Thank you !
Do you have idea if I need those 2 lines:
/* Disable LDOGPADC power down */
POWER_DisablePD(kPDRUNCFG_PD_LDOGPADC);
/* Disable Temperature sensor power down. */
POWER_DisablePD(kPDRUNCFG_PD_TEMPSENS);
If I wakeup from PowerDown, refresh Clock settings init ADC and take 3-4 samples asap ?
They looks as prevention of sensor sleep. But in my case I wakeup every 1-10s and measure temperature meanwile main functionality.
How fast ADC can stabilize after initialization ? May be I should wait few hundred microseconds ?
Regards,
Eugene