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.

TMS320F28379D: use output of epwm and synchronize them

Part Number: TMS320F28379D

Hello everyone,

I want to generate many epwms and I am using for that 2 TMS320F28379D ControlCards. The PWM outputs generated by the EPWM of the first ControlCard should be used to generate the PWM outputs from the EPWM of the second ControlCard (The digital PWM outputs are related). I am facing 2 problems: The first is how to use/access the digital output (the duty information) of the epwm from the first ControlCard so that I generate the other pwms from the second ControlCard, and the second is how to synchronize the outputs from these two ControlCards. In other words, the duty information (pwm output) generated from the first card should be accessed and used to generate pwm from the second card, and these two outputs should be synchronized.

Appreciate your help.

  • To transfer the EPWM duty and other sw information, please use SCI/SPI or any communication peripheral of your choice.

    For SYNCING the output of your ePWM from two different devices, you need to use EPWNxSYNCOUT and use a GPIO to select the sync output.

    Nima

  • Is there another way of synchronizing the epwm, mapping to GPIO will cause loss of some duty information since the epwm has high frequency.

  • RFY,

    Look at EXTSYNCOUT and EXTSYNCIN, these were designed exactly for this purpose. When using these you will lose a few cycles of phase between the devices, but you can easily account for this in the TBPHS register of the second device.

    As for communicating the duty cycle you will, as Nima has suggested, need to find a way to communicate that information to the second device. SPI or SCI could work, you could also use a number of parallel GPIOs if you wanted. Experiment with it and most importantly have fun!

    Regards,
    Cody