Chip_ADC_StartCalibration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Chip_ADC_StartCalibration

跳至解决方案
1,495 次查看
vaque
Contributor II

Hi!;

In adc_8xx.c there is a function to calibrate the ADC: Chip_ADC_StartCalibration:

/* Start ADC calibration */
void Chip_ADC_StartCalibration(LPC_ADC_T *pADC)
{
    /* Set calibration mode */
    pADC->CTRL |= ADC_CR_CALMODEBIT;

    /* Clear ASYNC bit */
    pADC->CTRL &= ~ADC_CR_ASYNMODE;

    /* Setup ADC for about 500KHz (per UM) */
    Chip_ADC_SetClockRate(pADC, 500000);

    /* Clearn low power bit */
    pADC->CTRL &= ~ADC_CR_LPWRMODEBIT;

    /* Calibration is only complete when ADC_CR_CALMODEBIT bit has cleared */
}

I am working with a LPC824. Why is firstly the /*Set calibration mode*/?, shouldn't it be last after the 500KHz SetClockRate?.

And other cuestion, what does it mean by ADC_CR_CALMODEBIT?  it says in UM10800.pdf at page 327 "21.6.1 ADC Control Register"  that the bit 8 (the corresponding of ADC_CR_CALMODEBIT) is reserved.

Thanks so much and regards. Daniel.

标签 (2)
标记 (2)
0 项奖励
回复
1 解答
1,275 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Daniel,

   Answer your two questions:

1. Why is firstly the /*Set calibration mode*/?, shouldn't it be last after the 500KHz SetClockRate?.

This is the calibration correct cycle, the chip just design it like this, you can't change the operation sequence.

You can find it from chapter:

pastedImage_1.png

2. what does it mean by ADC_CR_CALMODEBIT? 

CALMODE it bit 30, you can find it from the user manual:

pastedImage_2.png

I think maybe you want to ask ADC_CR_ASYNMODE, it is bit 8, I think it just want to clear these bit.

pastedImage_3.png

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,275 次查看
vaque
Contributor II

Kerry Zhou  thanks so much. You are aright, I wanted to ask about ADC_CR_ASYNMODE...

Thanks a lot! Regards. Daniel.

0 项奖励
回复
1,276 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Daniel,

   Answer your two questions:

1. Why is firstly the /*Set calibration mode*/?, shouldn't it be last after the 500KHz SetClockRate?.

This is the calibration correct cycle, the chip just design it like this, you can't change the operation sequence.

You can find it from chapter:

pastedImage_1.png

2. what does it mean by ADC_CR_CALMODEBIT? 

CALMODE it bit 30, you can find it from the user manual:

pastedImage_2.png

I think maybe you want to ask ADC_CR_ASYNMODE, it is bit 8, I think it just want to clear these bit.

pastedImage_3.png

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复