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.

CC2642R: Two PWM sync control methods

Part Number: CC2642R

I am using two PWM channels with differential timing synchronization.(like the image below)

Each pwm channel has a fixed frequency 0f 115k, and the differential settings and timer synchronization settings are performed as in the attached code.

    /* set TBPWML for pwm2 output is inverted */
    HWREG(0x40010000 + 0x0C) |= (1<<14);

    /* PWM timer sync */
    TimerSynchronize(GPT0_BASE, TIMER_0A_SYNC | TIMER_0B_SYNC);

Here, I want to shift the timing(phase offset control) of one channel to reach the half area of the other channel by shifting the timing of one channel by 5% step. (like the image blow)

If a delay was simply given between the start of each PWM channel without time synchronization, It was not possible to maintain a certain error range every time it was executed.

How can I shift one channel(always at regular intervals) out of two PWM channels that have the same frequency and operate as a differential? 

Thanks.

  • Hello jinbae,

    Although it is possible to inverse and synchronize the timers, phase shifting is not a solution provided by the PWM TI Driver or Timer Driverlib.  Thus a possible workaround would be to synchronize the PWMs (no inversion required), change the period value of one PWM module to be 25% or 75% of the other, delay for the length of this time once, and then revert the period back to its original value.  This should allow a reliable shift in the timer counts.

    Regards,
    Ryan