Hi Xiangjun rong
The corresponding sample bits of ADC12_SDIS register are cleared.
The workaround for us is no good. We must use ADCA for other operation with a different timing and syncing.
I also checked the errata before write on the community forum. I believe that not many companies use ADC in this way and then perhaps not yet encountered this problem!
This is the code generated by PE unless the limiting high/low and offset register
void ADC12_Init(void)
{
/* ADC12_SDIS: DS=0xC0F0 */
setReg16(ADC12_SDIS, 0xC0F0U); /* Set sample disable register */
/* ADC12_CLIST1: SAMPLE3=5,SAMPLE2=4,SAMPLE1=2,SAMPLE0=0 */
setReg16(ADC12_CLIST1, 0x5420U); /* Set channel list register 1 */
/* ADC12_CLIST3: SAMPLE11=8,SAMPLE10=8,SAMPLE9=8,SAMPLE8=8 */
setReg16(ADC12_CLIST3, 0x8888U); /* Set channel list register 3 */
/* ADC12_CLIST4: SAMPLE15=0,SAMPLE14=0,SAMPLE13=0x0E,SAMPLE12=0x0A */
setReg16(ADC12_CLIST4, 0xEAU); /* Set channel list register 4 */
/* ADC12_SCTRL: SC=0xF0 */
setReg16(ADC12_SCTRL, 0xF0U); /* Set scan control register */
/* ADC12_SCHLTEN: SCHLTEN=0 */
setReg16(ADC12_SCHLTEN, 0x00U); /* Set scan halted interrupt enable register */
/* ADC12_CAL: SEL_VREFH_B=0,SEL_VREFLO_B=0,SEL_VREFH_A=0,SEL_VREFLO_A=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
setReg16(ADC12_CAL, 0x00U); /* Set AD calibration mode and references */
/* ADC12_PWR2: ??=0,??=0,DIV1=9,??=0,??=0,??=0,??=0,SPEEDB=3,SPEEDA=3 */
setReg16(ADC12_PWR2, 0x090FU); /* Set Power 2 register */
/* ADC12_CTRL3: ??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,DMASRC=0,SCNT1=3,SCNT0=3 */
setReg16(ADC12_CTRL3, 0x1BU); /* Set control register 3 */
/* ADC12_CTRL2: DMAEN1=0,STOP1=1,START1=0,SYNC1=1,EOSIE1=1,CHNCFG_H=0,SIMULT=0,DIV0=9 */
setReg16(ADC12_CTRL2, 0x5809U); /* Set control register 2 */
/* ADC12_CTRL1: DMAEN0=0,STOP0=1,START0=0,SYNC0=1,EOSIE0=1,ZCIE=0,LLMTIE=0,HLMTIE=0,CHNCFG_L=0,??=0,SMODE=5 */
setReg16(ADC12_CTRL1, 0x5805U); /* Set control register 1 */
/* ADC12_STAT: CIP0=0,CIP1=0,??=0,EOSI1=1,EOSI0=1,ZCI=0,LLMTI=0,HLMTI=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
setReg16(ADC12_STAT, 0x1800U); /* Clear EOSI flag(s) */
/* ADC12_HILIMSTAT: HLS=0xFFFF */
setReg16(ADC12_HILIMSTAT, 0xFFFFU); /* Clear limit status flags */
/* ADC12_LOLIMSTAT: LLS=0xFFFF */
setReg16(ADC12_LOLIMSTAT, 0xFFFFU); /* Clear limit status flags */
/* ADC12_ZXSTAT: ZCS=0xFFFF */
setReg16(ADC12_ZXSTAT, 0xFFFFU); /* Clear limit status flags */
/* ADC12_PWR: ASB=0,??=0,??=0,??=0,PSTS1=0,PSTS0=0,PUDELAY=0x1A,APD=0,??=0,PD1=0,PD0=0 */
setReg16(ADC12_PWR, 0x01A0U); /* Set power control register */
}