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.

TMS320F28P550SJ: EPWM configuration question

Part Number: TMS320F28P550SJ

Tool/software:

Hi Champs,

In TRM, our requirements for clock synchronization of EPWM are as follows: we need to disable TBCLKSYNC before configuring EPWM, and then enable it after the configuration is complete.

In our example we realize this as below:

But this is an example of initialization. If the customer needs to modify the EPWM configuration (such as CMPA/CMPB values, etc.) during the code execution, do they also need to disable TBCLKSYNC before making changes and then enable it again after the configuration, or can they just modify the EPWM configuration directly? Thanks!

Best regards,

Julia

  • Hi Champs,

    Is there any updates? Thanks!

    Julia

  • Julia,

    There is no need to disable TBCLKSYNC. Generally, ePWM uses shadow register where you can update these values.

    Generally, the ePWM module has two sets of registers for key parameters like the counter-compare values (CMPA/CMPB) and the time-base period (TBPRD). 
    • Shadow registers: These are the memory locations that software writes to.
    • Active registers: The ePWM peripheral uses the values in these registers to generate the PWM waveform

    The hardware-controlled transfer of data from the shadow register to the active register is triggered by a configurable event. For registers like CMPA, CMPB, and TBPRD, the load event can be set to occur at one of the following moments: CTR=0 or CTR=PRD or Both CTR=0 and CTR=PRD or Software Force

    Our APIs uses this kind of approach that's why there is not need to disable TBCLKSYNC. They can just modify the EPWM configuration directly in shadow register.

    Regards,

    Sumit