LPC55S69 : temperature measurement example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S69 : temperature measurement example

1,005 Views
EugeneHiihtaja
Senior Contributor I

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

Labels (1)
0 Kudos
Reply
2 Replies

928 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

pastedImage_1.png

0 Kudos
Reply

928 Views
EugeneHiihtaja
Senior Contributor I

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

0 Kudos
Reply