This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AD采样,如何在pwm,on的时候多次采样。



   现在我设置的是在pwm--on中点采样也就是脉冲中点采样,但是只采样了一次,我想多采样几次,滤波。如何配置。

下面是我目前的配置。

/* Set up Event Trigger with period enable for Time-base of EPWM1 */                        \
    EPwm1Regs.ETSEL.bit.SOCAEN = 1;     /* Enable SOCA */                                        \
    EPwm1Regs.ETSEL.bit.SOCASEL = 2;    /* Enable zero event for SOCA */                        \
    EPwm1Regs.ETPS.bit.SOCAPRD = 1;     /* Generate SOCA on the 1st event */                    \
    EPwm1Regs.ETCLR.bit.SOCA = 1;       /* Clear SOCA flag */                                    \