How to calculate the ADC Clock?

显示  仅  | 搜索替代 

How to calculate the ADC Clock?

3,160 次查看
Contributor I

Hello, I'm trying use ADC at FRDM-K22F, it's working, but I didn't get success on calculate the ADC clock. I'm using for calculate the ADC clock, but the result the calculator don't is equal at result of conversion.


I'm setting my ADC clock this way:


    adcUserConfig.resolution = kAdc16ResolutionBitOf16;

    adcUserConfig.highSpeedEnable = false;  

    adcUserConfig.clkSrc = kAdc16ClkSrcOfBusClk;

    adcUserConfig.lowPowerEnable = false;

    adcUserConfig.asyncClkEnable = false;

    adcUserConfig.longSampleTimeEnable = false;

    adcUserConfig.longSampleCycleMode = kAdc16LongSampleCycleOf24;

    adcUserConfig.clkDividerMode = kAdc16ClkDividerOf8;  


    ADC16_DRV_Init(ADC16_INSTANCE, &adcUserConfig);



What's the result of ADC clock for this example?




标签 (1)
2 回复数

2,101 次查看
NXP TechSupport
NXP TechSupport

Hi, Adriano,

Regarding your question about the ADC clock frequency, from hardware perspective, I suggest you should check the following register setting.

1)pls check the ADCx_CFG1[ADICLK], which selects the clock source of ADC.

For K22, I copied the part here:


2)there is divider set up in the ADCx_CFG[ADIV], I copy it here.

Clock Divide Select

Selects the divide ratio used by the ADC to generate the internal clock ADCK.

00 The divide ratio is 1 and the clock rate is input clock.

01 The divide ratio is 2 and the clock rate is (input clock)/2.

10 The divide ratio is 4 and the clock rate is (input clock)/4.

11 The divide ratio is 8 and the clock rate is (input clock)/8.

For your code, I think you select bus clock as ADC clock source with ADICLK bit=00 in binary, the divider is 8 with ADIV bits=11 in binary, the ADC clock frequency is (bus clock)/8. I do not know your bus clock frequency, it is dependent on the MCG mode, and SIM_CLKDIV1 register setting.

Hope it can help you.


Xiangjun Rong

2,101 次查看
Contributor I

Hi Xiangjun,

My bus clock is 60 MHz divided for 8, so, my ADC Clock is 7,5 MHz. Now, I want find the conversion time per sample, I have to use this formula  (ConversionTime = SFCAdder + AVGNUM x (BCT + LSTAdder + HSCAdder)) ?

Thank you very much.

0 项奖励