AnsweredAssumed Answered

ADC configuration issue for MPC5777C

Question asked by Vrushali Taklikar on Jul 19, 2017
Latest reply on Jul 19, 2017 by Vrushali Taklikar

Hi,

 

I am trying to flash the code using pe micro multilink fx on to MPC5777C.

 

I have a adc configuration, but it seems I am nto able to write anything to eqadc_cfpr register.

 

only EQADC_MCR register is getting configured,.

 

Below is my code snippte

 

void EQADC_Init(void)
{
/* CBuffer0 */
EQADC_A.MCR.R=0x00000000;
EQADC_A.CFPR[0].R = 0x00800100; /* Send CFIFO 0 a ADC0 configuration command */
EQADC_A.CFPR[0].R = 0x80000302; // configure ADC_TSCR Register

/* enable ADC0 & sets prescaler= divide by 22 */
/* Enable also the ADC1 */
/* CBuffer1 BN=1 */
EQADC_A.CFPR[0].R = 0x82800101; // configure ADC_CR1 Register in buffer 1
/* EOQ, enable ADC1 & sets prescaler= divide by 22 */

EQADC_A.ETDFR.B.DFL = 0x0;
EQADC_A.CFCR0.R = 0x0410; /* Trigger CFIFO 0 using Single Scan SW mode */
while(EQADC_A.FISR[0].B.EOQFX != 1) {}; /* Wait for End Of Queue flag */
EQADC_A.FISR[0].R = 0x10000000;
}

 

Please suggest if anything is missing here, that MCU is not allowed to write into eqadc register.

 

Thanks

Vrushali

Outcomes