This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC Calibration

Hi

I am new to this forum and trying to configure A2D for Tms 320 28335, Reference guide for ADC module SPRU 812 suggest following sequence for calibration in section 1.8 page 29.

 

EALLOW;

SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;

ADC_cal();

SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 0;

EDIS;

 

Where as dsp2833x_adc.c   from the folder tidcs\c28\DSP2833x\v131\DSP2833x_common\source\DSP2833x_Adc.c does not sets the ADCENCLK =0; while calibrating ADC in initADC function

 

EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
ADC_cal();
EDIS;

 

I want to know which one is correct approach

 

I will be thankful for the reply

Ahmed Shakeel

 

 

  • Ahmed Shakeel said:
    EALLOW;
    SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
    ADC_cal();
    SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 0;
    EDIS;
     
    Where as dsp2833x_adc.c   from the folder tidcs\c28\DSP2833x\v131\DSP2833x_common\source\DSP2833x_Adc.c does not sets the ADCENCLK =0; while calibrating ADC in initADC function
     
    EALLOW;
    SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
    ADC_cal();
    EDIS;
     
    I want to know which one is correct approach

    Either way is fine.  The first method just turns off the ADC clock for the time being.  If it is turned off then it would need to be re-enabled before using the ADC.  

    -Lori