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.

EPWM and ADC interrupt error



Hello.

I control EPWM and ADC interrupt. pair channel one and pair channel 2,3,4 are independent.

after finishing channel one pulse . channel 2,3,4 turn on.

and channel 4 falling edge is connected with interrupt. in that interrupt ADC conversion will start

so register should be changed to control EPWM. 

at the first time when debugging the code, channel 4 interrupt perfectly work. after that I change the EPWM register 

second time when turn on the channel 2,3,4 again, EPWM4 channel interrupt is ignored by something.

help me. ;(

  • Hi,

    In short you mean to say that EOC of channel 4 triggers SOC of channel 1. Are you using sequential technique or any other? Also, which controller are you using?

    Regards,

    Gautam

  • Hi ha kilho,

    If the interrupt works correctly the first time but not the second time, then the most likely issue is that one of the flags was not acknowledged.  Please check that all of the following are occurring in the ISR:

    The ADC interrupt flag is cleared 

    The Pie interrupt flag is cleared

    The CPU interrupt flag is cleared