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.

C2000: Why is EALLOW required before call to ADC Calibration?

Guru 20075 points

Other Parts Discussed in Thread: TMS320F28335

Hello,

According to the TMS320F28335 datasheet (page 49), the system control registers are not EALLOW protected, so why does the compiler manual (page 29) specify the ADC calibration function call as shown below.

Stephen

EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK=1;
(*ADC_Cal) ();
SysCTRLRegs.PCLKCR0.bit.ADCENCLK=0;
EDIS;

 

  • The TMS320F28335 datasheet doesn't tell the whole story. Some parts of the system control register are EALLOW.  

    Page 34 of sprufb0d.pdf (TMS320x2833x, 2823x System Control and Interrupts) states the PCLKCR0 is EALLOW protected.