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.

TMS320F280049: ePWM1 and Timer0 synchronization

Part Number: TMS320F280049

Hi Experts,

Could you please let me know there is any way to synchronize ePWM1 and Timer0?

Currently, ePWM1 and ePWM8 are synchronized, the ADC is done by using the ePWM8 trigger and then DMA sends the data.
Please refer to the attached file.

On the other hand, if Timer0 is synchronized with ePWM1, I would like to utilize Timer0 interruption for the ADC and DMA transfer.

Thank you for your kind check its possibility.
Best regards,
Hitoshi

TI_F280049_Timer0_ePWM1_sychronization.pdf

  • Hitoshi-San,

    does it need to be perfectly synchronized? Can it be off by a few clock cycles? You should be able to reload the timer's TCR register right after starting the PWM's timer. This will cause the synchronization to  be close, but not perfect. Also you could use the TBCTR= PRD ISR to start the timer if desired, that would have a similar effect. 

    If your only goal is to start the ADC and DMA transfer, have you considered using CMPC or CMPD of a PWM to trigger the EPWMxSOCA or EPWMxSOCB triggers? Depending on how you configure these you could trigger the DMA, the ADC, or both. CMPC and CMPD are configurable events just like CMPA and CMPB, but they are used to trigger things like Start Of Conversions for the ADC.

    Thank you for your hard work!

    Regards,
    Cody 

  • Hi Cody,

    Thank you so much for your detailed explanation.
    I understood.
    Will try some way to achieve the target function.

    Thank you again.
    Best regards,
    Hitoshi