I have ADC conversion results issue. All odd indexed result registers (ADCRESULT1/3/5/.../13/15) reflect the results correctly, but the even indexed result registers (ADCRESULT0/2/6/.../12/14) are always zero. My configuration looks like below.
//ADC reference register AdcRegs.ADCREFSEL.bit.REF_SEL = AdcRefSel_Ext1_500V;
//ADCTRL3 configuration
AdcRegs.ADCTRL3.all = 0;
AdcRegs.ADCTRL3.bit.ADCBGRFDN = AdCtrl3BandgapRef_PU;
// Power up bandgap/reference/ADC circuits
DELAY_US(ADC_usDELAY);
AdcRegs.ADCTRL3.bit.ADCPWDN = AdCtrl3AdcCorePU;
// Power up ADC core
AdcRegs.ADCTRL3.bit.ADCCLKPS = AdCtrl3ClkPsDiv6;
// clk prescale
AdcRegs.ADCTRL3.bit.SMODE_SEL = AdCtrl3SampMode_Sim;
// sampling mode
//ADCTRL2 configuration
AdcRegs.ADCTRL2.all = 0;
AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = AdCtrl2PwmSoc_Enable;
// enable SOCA from ePWM to start SEQ1
AdcRegs.ADCTRL2.bit.EPWM_SOCB_SEQ2 = AdCtrl2PwmSoc_Enable;
// enable SOCB from ePWM to start SEQ2
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = AdCtrl2IntSeq_Disable;
// disable ADC Seq1 interrupt
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ2 = AdCtrl2IntSeq_Disable;
// disable ADC Seq2 interrupt
//ADCTRL1 configuration
AdcRegs.ADCTRL1.all = 0;
AdcRegs.ADCTRL1.bit.SEQ_CASC = AdCtrl1SeqMode_DualSeq;
AdcRegs.ADCTRL1.bit.CPS = AdCtrl1Cps_Div1;
AdcRegs.ADCTRL1.bit.ACQ_PS = AQ_PS_2CLK;
AdcRegs.ADCTRL1.bit.CONT_RUN = AdCtrl1OpMode_StartStop;
// Setup continuous mode
//ADCMAXCONV configuration
AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 7;
// 8 channels on SEQ1
AdcRegs.ADCMAXCONV.bit.MAX_CONV2 = 7;
// 8 channels on SEQ2
DELAY_US(ADC_usDELAY);
//5ms delay before first convertion
AdcRegs.ADCCHSELSEQ1.all = 0x0000;
AdcRegs.ADCCHSELSEQ2.all = 0x0000;
AdcRegs.ADCCHSELSEQ3.all = 0x0000;
AdcRegs.ADCCHSELSEQ4.all = 0x0000;
Please refer to the ADC settings and results shown in the attachment.
Any ideas what was wrong?