Other Parts Discussed in Thread: SYSCONFIG
The article "Application Report Leverage New Type ePWM Features for Multiple Phase Control " by Aki Li and Nima Eskandari mentioned TIDA-00961.
Where to find code of TIDA-00961? Thanks
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.
The article "Application Report Leverage New Type ePWM Features for Multiple Phase Control " by Aki Li and Nima Eskandari mentioned TIDA-00961.
Where to find code of TIDA-00961? Thanks
Never mind -- I found the code, and I have some questions about global load and one shot load
The article "Application Report Leverage New Type ePWM Features for Multiple Phase Control " by Aki Li and Nima Eskandari mentioned TIDA-00961 example project which has the following code:
EPWM_setGlobalLoadTrigger(base1, EPWM_GL_LOAD_PULSE_CNTR_PERIOD);
EPWM_setGlobalLoadTrigger(base2, EPWM_GL_LOAD_PULSE_SYNC);
So is "base1.TBCTR = PERIOD" the “global load moment”? Does it generate some kind of “global load sync pulse” which can be used by other EPWMS (base2 in this example) for “global load” at this same “global load moment”, as indicated by “EPWM_GL_LOAD_PULSE_SYNC”?
Another question:
TIDA-00961 example project has the following code:
EPWM_setGlobalLoadTrigger(base2, EPWM_GL_LOAD_PULSE_SYNC);
it means base2's "shadow to active load" happens at the moment of "sync event". How is this "sync event" generated?
Hi Quentin,
Apologies for the late response. The sync event is configurable by you.
For each EPWM module, you can define a sync source (a sync input called "SYNCI"), and a sync output (called "SYNCO"). These can be two completely separate/independent signals, or you can just pass through the input signal as the output (and then use that output signal to sync another PWM module, for example).
If you look at the TRM Figure 18-7. Time-Base Counter Synchronization Scheme, you can see how the signals can be used by EPWM modules and passed through to synchronize other EPWM modules. For example, EPWM1 can source its syncing from an external signal. It can also output a sync signal for other EPWM modules (down the sync line) to use as a sync source. You could also, for example, select a counter=0 event as the EPWM1 sync-out source. This means that every time EPWM1's counter matches '0', a pulse will be generated on the SYNC-OUT line and you can use this sync pulse as a SYNC-IN "event" in other EPWM trigger certain actions. So to sum up, the sync signal can be generated by a variety of events depending on your application/need. It will result in a single pulse that can be used to trigger other actions to occur (such as phase shifting, etc.)
I also wanted to highlight some of our resources that have some helpful information on these topics.
Let me know if any of these help clarify things! If not, feel free to comment back here and I'll be happy to assist further
Best Regards,
Allison
Hi Allison,
Thanks a lot for your elaboration! I understood all of them.
But my question is specific to the TIDA-00961 example project. From the following code:
EPWM_setGlobalLoadTrigger(base1, EPWM_GL_LOAD_PULSE_CNTR_PERIOD);
EPWM_setGlobalLoadTrigger(base2, EPWM_GL_LOAD_PULSE_SYNC);
I believe at the moment of "base1.TBCTR = PERIOD" , “base1 EPWM” does its own GLOBAL LOAD, and also generates "SYNCO" to pass to “base2 EPWM” as its "SYNCI" at exactly the same moment. So “base2 EPWM” does its own GLOBAL LOAD when it receives "SYNCI" which is 2 clock cycles later than base1’s "SYNCO" if using 280049C? Could you please confirm?
Thanks,
Quentin
Hi Quentin,
Glad everything explained prior was clear!
Yes, so the synchronization does incur delay as the device TRM states:
So if the base2 PWM has global load based on a sync signal, this would also incur some delay. Let me know if you have issues/doubts with this.
Best Regards,
Allison