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.
Hello everyone,
I need modules ePWM1 to ePWM8 to work with symmetric high resolution duty control. All ePWM modules have the same period (TBPRD) but they have different phases (TBPHS).
I am able to obtain the desired behaviour on one ePWM by following the procedure described in the TRM (15.2.4.4.1 High-Resolution Period Configuration). However I would like a bit more information about the initial synchronization at steps 8-9.
As far as I understand:
The above is very clear from the manual, but what is not very clear is what I can and cannot do after the initial synchronization. So my question is the following:
If I stop the timebase clock for some time (PCLKCR0[TBCLKSYNC]= 0) and restart it later, will the HRPWM keep performing correctly or does it need to be resynchronized?
Cheers,
Pierre
Hi Pierre,
Do you need hi-res phase shift control OR will phase shift control with regular resolution suffice? Writing to PCLKCR0[TBCLKSYNC] enables/disables clocking of all PWM modules. All PWMs should work normally once re-enabled, especially if you do not need hi-res phase shift control. I think PWMs should work even if you require hi-res phase shift control but I am a bit less certain of this.
Please note that disabling and enabling TBCLKSYNC may put PWM outputs in a continuous high/low/hi-Z state till the clocks are re-enabled and the next configured event (Action Qualifier, Dead Band, etc) takes place.
I hope this helps.
Hrishi
Hi Hrishi,
I do not need hi-res phase shift control. Regular phase shift resolution is perfectly fine.
Can you tell me if the HRPWM will keep working properly if I perform the following sequence:
Setting SWFSYNC before enabling TBCLKSYNC has worked for me in previous projects, but I have never used it with this HRPWM configuration (symmetric duty control), so I'd like to know if it is going to interfere with the up-down hi-res duty control.
Cheers,
Pierre
Hrishi,
Thank you for your suggestion regarding TBCTR but since I am in up-down count I also need to take care of the direction. The way I do it currently is with TBCTL[PHSDIR]. I'm not aware of a way to "write" TBSTS[CTRDIR] in the same manner you can write TBCTR. Is there?
Pierre