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.

Synchronization of ePWMs

Hi,

I need to program a digital controller for a 3-phase inverter. It needs three different PWM signals which should be synchronized with 3 different external signals. I checked F2812, F28335 and F2808, in all of them the input synchronization just for the first instance (ePWM1) comes from an external pin. Is there any DSP that its ePWMs can receive synchronization input from 3 external pins. I mean three slave ePWMs to three external signals.

Thanks

  • Ahmad,

    As you mention, PWM1 can synchronize to an external signal.  However, PWM2 can then synch to PWM1, etc, etc.  This allows a full system to get synchronized off of one external signal.

    If you needed to synchronize individual PWMs to three different external signals some amount of software would be necessary.  For instance you could set an unused GPIO as input and then set an external interrupt (XINT) to fire an interrupt when the GPIOs value changed from 1 to 0 or 0 to 1.   You could also choose to do similar things with the TZ, CAP, or QEP peripherals.  Which one is best will depend on your application.

    I would recommend taking a look at the software in the TMDSHVMTRPFCKIT kit or perhaps buying the kit and investigating its functionality.  This kit ships with the F28035 C2000 microcontroller.  See the link below for more:
    http://focus.ti.com/mcu/docs/mcuprodtoolsw.tsp?familyId=916&sectionId=95&tabId=2655&toolTypeId=1&DCMP=DSP_C2000&HQS=Other+OT+f28xkits#appkits


    Thank you,
    Brett

  • Thank you Brett for your inputs.

    I can not use XINT because it has at least 150ns delay, and also in my controller there is the possibility of occuring three external signal at the same time so two of them will be pending and this can delay the last one more than 300ns. I can not predict this condition and reduce the error.

    TZ is a good idea but the problem is that it does not reset the counter, and if I want to use an interrupt for resetting the counter I will have the same problem as XINT.

    Synch in without any delay makes the counter reset, I can do my calculation according to the new value of counter very accurate.

     

    Thanks

    Ahmad

  • Hi Ahmad

    You might be able to use the eCAP module, to get the time stamp of each pulse and than with little arithmetic you can SW sync the ePwm witin the interrupts.

    As I've never really used the eCAP modul I can not tell you if this is feasible or not. But if it is not, then a FPGA solution is probably the only one as I don't know of any othe r micro with as flexible PWM module as C28 family.

    Regards, Mitja