Hi,
Hi all,
I have set up my ADC in cascaded and Simultaneous mode and to trigger both Sequencers when the PWM (TBCTR == TBPRD). Below is the setup
in ADC init code snippet.
Question: Once my ADC is triggered by EPWM1 on reaching the TBCTR == TBPRD. Do, I need to clear the EPWM interrupt?
// EPWM-1 are set for SOC in SEQ1.
AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = 1; // Enable EVASOC to start SEQ1
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1; // Enable SEQ1 interrupt (every EOS)
// AdcRegs.ADCTRL2.bit.EPWM_SOCB_SEQ2 = 1; // Enable EVASOC to start SEQ2.
// AdcRegs.ADCTRL2.bit.INT_ENA_SEQ2 = 1; // Enable SEQ2 interrupt (Every EOS).
// Start ADC with EPWM1 (TBCTR == TBPRD) event:
EPwm1Regs.ETSEL.bit.SOCAEN = 1; // Enable SOC on A group
EPwm1Regs.ETSEL.bit.SOCASEL = 2; // NEW, trigger ADC at TBPRD
EPwm1Regs.ETPS.bit.SOCAPRD = 1; // Generate pulse on 1st event
Regards,
Kuldeep