Hi
I ask for the answer How to set LOADAMODE/LOADBMODE valule in EPWM module, Load on CTR = Zero, Load on CTR = PRD, or Load on either CTR = Zero or CTR = PRD?
What is the major consideration when set the LOADAMODE/LOADBMODE valule? Thank you.
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.
Hi
I ask for the answer How to set LOADAMODE/LOADBMODE valule in EPWM module, Load on CTR = Zero, Load on CTR = PRD, or Load on either CTR = Zero or CTR = PRD?
What is the major consideration when set the LOADAMODE/LOADBMODE valule? Thank you.
Hi Qui,
LOADxMODE is independent of AQ set or clear: it just determines when in each PWM cycle the shadow-to-active load takes place. The AQ settings determine the action at the pin on a compare match.
In the code you posted, CMPA is loaded from its' shadow on CTR=0, while CMPB is loaded from its' shadow on CTR=PRD. The AQ settings do not change: A output is active high, while B output is active low; so they form a complementary pair. The PWM pattern is something like the attached. The only thing the LOADxMODE bits are doing is affecting the shadow-to-active updates.
Regards,
Richard