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.

TMS320F280049: ePWM: GLDPRD and SOCAPRD synchronization

Part Number: TMS320F280049


Hello everyone,

I'm using the TMS320F280049 for a power converter where the PWM frequency is a multiple of the control loop frequency. I'm using the SOCAPRD register to rescale the control ISR frequency.

I would like to transfer the PWM shadow register to active registers at the same frequency of the control loop, and I see that GLDPRD can help me but I have the following doubt:

Is there a way to ensure that SOCACNT and GLDCNT counts toghether, having always the same value or at least starting them at the same time? If I set the same value into SCAPRD and GLDPRD and their respective counters count together, the shadow to active transfer should happen at the same time the control ISR is called. Is there a way to ensure the synchronization between the two counters?

Thanks

Angelo

  • Hi,

    If you choose the same event selection for SOCA generation and GLD - the load strobe pulse and the soca pulse will be generated as per the counter configuration in GLDPRD and SOCAPRD accordingly. Note that these 2 counter periods are different in range (SOCAPRD2 is 4 bits, GLDPRD is 3bits).
    Also, another way you can do is  poll the value of SOCACNT and update the new values to shadow registers when the SOCAPRD limit would reach, that way you've the load and SOCA generation in sync.

  • Hello,

    thanks for your reply.

    So, if I'm understanding correctly, setting the same period in SOCAPRD and GLDPRD and the same event for SOCA and GLD, SOCA pulse and load strobe will be triggered always together. Am I correct?

    The second solution seems useful when you have the control loop frequency to be a multiple of the switching frequency.

    Thanks

    Angelo

  • Hi,

    4ngelo said:

    So, if I'm understanding correctly, setting the same period in SOCAPRD and GLDPRD and the same event for SOCA and GLD, SOCA pulse and load strobe will be triggered always together. Am I correct?



    Yes - If the same pulse is used then the events will be in Sync.

    4ngelo said:

    The second solution seems useful when you have the control loop frequency to be a multiple of the switching frequency.



    Yes - but it can be used in this case as well, as you are pre-scaling the load pulse, as well as SOC event generation.