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.

TM4C123GH6PM: PWM Syncronization across different modules

Part Number: TM4C123GH6PM

Hello,

Is it possible to sync pwm generators when you are using different modules? From what I understand, in order to use different periods, I need to use different modules, and that the methods:

PWMSyncTimeBase()
PWMSyncUpdate()

only work for the generators of the same module. I think I got my answer from https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/342642/synchronize-pwm-generators-of-differnet-pwm-modules and the poster Amit Ashara has posted a workaround.

But I am just asking again to clarify, and maybe the API has changed since then. Rephasing my questions:

a. can we sync different pwm modules?

b. if we are using the same module, can we set different periods for different generators?

Best regards,

C.

  • Hi Can,

    a. can we sync different pwm modules?

    No, that is not possible. There are two PWM modules in TM4C123. However, you cannot synchronize between two independent modules. 

    b. if we are using the same module, can we set different periods for different generators?

    Synchronization is only possible for the same module. Please also bear in mind that it is only possible if all generators are loaded with the same timebase. You cannot have different generators configured with different frequency to synchronize. 

    Synchronized. The PWM generator and its two outputs signals are used in conjunction with
    other PWM generators using a common, unified time base. If multiple PWM generators are
    configured with the same counter load value, synchronization can be used to guarantee that
    they also have the same count value (the PWM generators must be configured before they are
    synchronized). With this feature, more than two MnPWMn signals can be produced with a known
    relationship between the edges of those signals because the counters always have the same
    values. Other states in the module provide mechanisms to maintain the common time base and
    mutual synchronization

  • thank you for illustrious answer.