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.

TMS320F28P650DK: SYNC0 is configured as the synchronous input source for the PWM module

Part Number: TMS320F28P650DK

Tool/software:

I want to configure the SYNC0 signal as the PWM1 synchronous input source, with PWM1 counting up and down. Then, when the PWM1 count value equals 0, output the synchronous source to the three-channel PWM module as the synchronous input. Is this feasible? The current issue lies in the problem with configuring the synchronous input of PWM1. The chip operates at 200MHz. We aim to change the PWM1 count from SYNC0 count to the downward counting position of 2400, that is, count to 0 after 12 μ s. The PWM interrupt is triggered when the count value equals 0 and 12500, that is, the interrupt frequency is 16K. However, there is no synchronization effect after configuration. Do you know how to handle and modify it? The following are screenshots of the program and the oscilloscope. The yellow oscilloscope is GPIO34, configured as the SYNC0 signal. The green one is the GPIO port that triggers the SYNC0 interrupt at a high level and the completion interrupt at a low level. The blue one is the GPIO port that triggers the PWM interrupt at a high level and the completion interrupt at a low level

  • Hi,

    Yes you can  use ECAT_SYNC0 as sync input to EPWM1 and EPWM1 can send sync to other pwm at its counter zero.

    The config's you have looks correct.

    Are you not seeing the sync event on pwm1 with ecat_sync0 ? Can you show the pwm1 output and ecat_sync0 scopeshot ? Additionally you can check the PWM1 register to see if the sync has occurred or not ?

    The PWM interrupt is triggered when the count value equals 0 and 12500,

    The green one is the GPIO port that triggers the SYNC0 interrupt at a high level and the completion interrupt at a low level. The blue one is the GPIO port that triggers the PWM interrupt at a high level and

    I could not understand what you meant by green and blue above ?

  • The yellow signal corresponds to the SYNC0 signal. Upon entering the SYNC0 interrupt, the green signal transitions to a high level. Once the SYNC0 interrupt is completed, the green signal returns to a low level. During the PWM1 interrupt, the blue signal transitions to a high level and subsequently returns to a low level upon completion of the PWM1 interrupt. The PWM1 interrupt has priority and can preempt both the SYNC0 and PDI interrupts. The PWM1 interrupt is triggered when the TBCTR register equals either 0 or 12500.Previously, our C200WARE version was 5.0, and now it's 5.04, but it still has no effect. The following is the current PWM1 configuration program and a screenshot of the oscilloscope

  • The PWM1 module is only used to count and trigger 16KHz interrupts without signal output

  • Hi,

    Okay the explanation makes sense now.

    But I still don't understand what you mean by below ? What do you mean by synchronization effect ? You are seeing the sync interrupt getting triggered right ? Is the time base counter not updated as expected after sync is what you are saying ?

    However, there is no synchronization effect after configuration. Do you know how to handle and modify it?

    Thanks

  • Also, can you send me a simplified version of your project to see issue at my end

    Thanks