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.

TMS320C28346: PWM tmer interrupt generation

Part Number: TMS320C28346
Other Parts Discussed in Thread: ADS7953

In my application, the 32 bit timer which controls the ePWM is programmed as an up-down counter. Presently, the timer is programmed to generate an interrupt on the down count to zero. This interrupt initiates a call to a routine which starts an external A to D conversion process through the SPI port (connected to an ADS7953). Can a second interrupt be generated by the same 32 bit timer upon reaching the up count value? I wish to over-sample some of the A to D data used for PWM control so I need to generate two interrupts from the same PWM timer so that I can obtain two evenly spaced A to D samples each PWM period.     

  • Terry,

    on this device you cannot use the Event Trigger sub-module to generate an interrupt on both up and down counts.

    Are you enabling the PWM output, or just using the ePWM as timer? If you are not using the output I think the easiest workaround is to half the PWM's period, you will then receive interrupts twice as often. 

    If you have a spare PWM you can configure it at twice the rate of your first PWM and trigger your ADC off of that PWM.

    If either of those solutions don't work we can look into other options.

    Regards,
    Cody 

  • Cody,

    Thanks for the reply.
    On earlier devices the interrupt could be generated on both on up and down count. I just wanted verification on this particular device before exploring other options (the timer is being used for PWM generation).
  • Terry,
    What earlier devices was this possible? Did you mean "On later devices"?

    Regards,
    Cody