VCLK=80MHZ
adcREG1->RSTCR = 1U; /*reset adc*/
adcREG1->RSTCR = 0U; /*exit reset state*/
adcREG1->OPMODECR = 0x00140001U; /*enable adc*/
adcREG1->CLOCKCR = 3U; //ADCLK prescale 1/4
adcREG1->GxMODECR[1] = 0x22; //G1 CH ID mode, single conversion, software trigger
adcREG1->BNDCR = 16<<16 // Set EV FIFO size to 16
|32; // Set G1 FIFO size to 16
adcREG1->BNDEND = 2; // Set G2 FIFO size to 32
adcREG1->G1SAMP = 62; //Acquization prescale = 1/64
adcREG1->GxSEL[1] = 0x1<<7;//Chan 7;
//wait for the conversion to finish before we try to read the data
while((adcREG1->G1SR & 0x1)!= 1);
//read from the FIFO
DigitalResult =(adcREG1->GxBUF[1].BUF0)&0x000003FF;
Problem:
External power supply to pin-7 the voltage,but the adc result is wrong.