Hi Experts,
I am asking for my customer here.
They are using 80 Pin F28034-PN to develop HVAC, and also found the following restriction here about ADC Initial Conversion.
Here is customer ADC code, they use EPWM1_SOCA to trigger sequential SOC0~SOC11 and SOC15, simultaneous they also use EPWM4_SOCB to trigger sequential SOC12, SOC13, and SOC14. So, according to the errata manual, the ADCRESULT0 and ADCRESULT12 will be missing or incorrect, Right? If yes, how far will the error go?
EALLOW; AdcRegs.ADCCTL1.bit.RESET = 1; asm(" NOP "); asm(" NOP "); AdcRegs.ADCCTL1.bit.ADCREFSEL = 0; AdcRegs.ADCCTL1.bit.ADCBGPWD = 1; AdcRegs.ADCCTL1.bit.ADCREFPWD = 1; AdcRegs.ADCCTL1.bit.ADCPWDN = 1; AdcRegs.ADCCTL1.bit.ADCENABLE = 1; (*Device_cal)(); asm(" RPT#100 || NOP"); DELAY_US(ADC_usDELAY); AdcRegs.ADCCTL1.bit.INTPULSEPOS = 0; AdcRegs.ADCCTL2.bit.ADCNONOVERLAP = 1; AdcRegs.ADCSOC0CTL.bit.ACQPS = 6; AdcRegs.ADCSOC1CTL.bit.ACQPS = 25; AdcRegs.ADCSOC2CTL.bit.ACQPS = 25; AdcRegs.ADCSOC3CTL.bit.ACQPS = 6; AdcRegs.ADCSOC4CTL.bit.ACQPS = 6; AdcRegs.ADCSOC5CTL.bit.ACQPS = 6; AdcRegs.ADCSOC6CTL.bit.ACQPS = 6; AdcRegs.ADCSOC7CTL.bit.ACQPS = 6; AdcRegs.ADCSOC8CTL.bit.ACQPS = 6; AdcRegs.ADCSOC9CTL.bit.ACQPS = 6; AdcRegs.ADCSOC10CTL.bit.ACQPS = 6; AdcRegs.ADCSOC11CTL.bit.ACQPS = 6; AdcRegs.ADCSOC12CTL.bit.ACQPS = 6; AdcRegs.ADCSOC13CTL.bit.ACQPS = 6; AdcRegs.ADCSOC14CTL.bit.ACQPS = 30; AdcRegs.ADCSOC15CTL.bit.ACQPS = 6; AdcRegs.ADCSOC0CTL.bit.CHSEL= 3; AdcRegs.ADCSOC1CTL.bit.CHSEL= 3; AdcRegs.ADCSOC2CTL.bit.CHSEL= 4; AdcRegs.ADCSOC3CTL.bit.CHSEL= 6; AdcRegs.ADCSOC4CTL.bit.CHSEL= 2; AdcRegs.ADCSOC5CTL.bit.CHSEL= 1; AdcRegs.ADCSOC6CTL.bit.CHSEL= 0x0e; AdcRegs.ADCSOC7CTL.bit.CHSEL= 0x00; AdcRegs.ADCSOC8CTL.bit.CHSEL= 0x0d; AdcRegs.ADCSOC9CTL.bit.CHSEL= 0x0f; AdcRegs.ADCSOC10CTL.bit.CHSEL= 9; AdcRegs.ADCSOC11CTL.bit.CHSEL= 7; AdcRegs.ADCSOC12CTL.bit.CHSEL= 0x0b; AdcRegs.ADCSOC13CTL.bit.CHSEL= 0; AdcRegs.ADCSOC14CTL.bit.CHSEL= 8; AdcRegs.ADCSOC15CTL.bit.CHSEL= 5; AdcRegs.ADCSOC0CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC1CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC2CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC3CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC4CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC5CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC6CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC7CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC8CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC9CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC10CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC11CTL.bit.TRIGSEL = 5; AdcRegs.ADCSOC12CTL.bit.TRIGSEL = 0x0c; AdcRegs.ADCSOC13CTL.bit.TRIGSEL = 0x0c; AdcRegs.ADCSOC14CTL.bit.TRIGSEL = 0x0c; AdcRegs.ADCSOC15CTL.bit.TRIGSEL = 5; AdcRegs.ADCINTSOCSEL1.bit.SOC0 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC1 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC2 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC3 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC4 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC5 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC6 = 0; AdcRegs.ADCINTSOCSEL1.bit.SOC7 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC8 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC9 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC10 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC11 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC12 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC13 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC14 = 0; AdcRegs.ADCINTSOCSEL2.bit.SOC15 = 0; AdcRegs.ADCCTL1.bit.TEMPCONV = 1; AdcRegs.INTSEL1N2.bit.INT1SEL = 3; AdcRegs.INTSEL1N2.bit.INT1CONT = 0; AdcRegs.INTSEL1N2.bit.INT1E = 1; AdcRegs.INTSEL1N2.bit.INT2SEL = 13; AdcRegs.INTSEL1N2.bit.INT2CONT = 0; AdcRegs.INTSEL1N2.bit.INT2E = 1;
In a word, 80Pin F28034 only one ADC module has 16 Chanel, and ADC has only 16 SOC trigger signal, so if set the below sequential or simultaneous sampling mode, if the application calls for a given series of conversions, SOC0→SOC1→SOC2, to initiate periodically, then set up the series instead as SOC0→SOC1→SOC2→SOC3 and only use the last three conversions, ADCRESULT1, ADCRESULT2, ADCRESULT3, thereby discarding ADCRESULT0. Therefore, customer would waste some analog channel resources. Could you explain it in more detail about ADC: Initial Conversion? Or how to design to meet with customer's need up to 16 channel ADC sampling here. Thanks a lot!