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.

TMS320F28377D: the effect time point of shadow register if sync signal set as trigger

Part Number: TMS320F28377D

Tool/software:

Hi team

if I use the way shown in the picture to trigger the cmp shadow to active, at that time the counter may not reaches to 0 or TBPRD.

i would like to understand whether the cmp shadow value takes effect immediately or the shadow value will take effect in next TB cycle. 

is there any mistake in below pwm configuration if i want to realize this function? The target is to use PMW1 TB_CTR_Zero as sync signal to trigger PWM2/3/6 shadow to active

thanks

joe

  • Hi Joe,

    A shadow-to-active load will occur on the selected event at the rising edge of TBCLK. 

    To use EPWM1 CTR = 0 as the sync source for other PWM loads, you need to be sure you do the following:

    • Configure the EPWM1 SYNC-OUT pulse to be on CTR = 0
    • Configure the EPWM2 and EPWM3 SYNC-IN source to be from EPWM1 SYNC-OUT (this is set up by default as seen in sync chain snippet below)
    • Configure EPWM6 SYNC-IN source to be from EPWM1 SYNC-OUT
      • The EPWM modules are grouped together in the sync scheme as seen in the TRM snippet below.
      • EPWM6's SYNC-IN signal is actually sourced from EPWM4 (also seen in the snippet). So in order to sync EPWM6 to EPWM1, you need to be sure EPWM4's SYCN-IN source is EPWM1 SYNC-OUT.

    Once you configure the EPWM sync sources to be from EPWM1, it's just a matter of enabling shadow loading for your specific parameters and setting the shadow load mode to be on a SYNC. Were you seeing any specific issues from implementing this?

    Best Regards,

    Allison

  • Hi Allison

    No problems from my side, already done the experiment, only see one thing need to be paid attention is that the TBCLKSYNC should be set again after all the above registers are modified, even if the TBCLKSYNC already be set in system initialize function.

    Thanks

    Joe

  • Hi Joe,

    Glad to hear it! Yes, the TBCLKSYNC should be set after the EPWM modules are configured as this will start the EPWM module clocks at the same time (below is description snippet from TRM).

    If there are no other issues, I can can close this thread. Feel free to open a new one should you run into problems.

    Best Regards,

    Allison