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.
How to do independent operation of one shot trip (enable PWM and Disable PWM ) with single group of EPWM. for ex. EPWM4A and EPWM4B I have to ON and OFF independently.
Hi Divyesh,
In order to set independent operations to the output of EPWM4A and EPWM4B based on a one shot trip is done by the TZCTL[TZA] and TZCTL[TZB] register bits.
TZCTL[TZA] will affect the output A. TZCTL[TZB[ will affect output B.
Have you looked at any of the C2000Ware examples that use trip zone?
You can find it here C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f2806x\examples\c28
Best,
Ryan Ma
If I select one shot trip or CBC in both the cases the event TZA and TZB are triggered. So, how can I turn ON and OFF the PWM4A and PWM4B ?
Right now ,I triggered forcefully OST and clear it for ON and OFF PWM.
But when I want to ON only PWM4A and I clear OST flag both EPWM4A and EPWM4B are ON.
Is there any other way to turn ON and OFF PWM output???
Hi Divyesh,
With the design in f2806x, since there is an OR gate when a CBC or OSHT event occurring it will effect both outputs. (Setting both outputs to whatever you configured TZA/TZB action to be) I would suggest using another EPWM module to have PWM4A on when needed and not be affected by PWM5A's trip setting.
However there is an option for TZA/TZB to do nothing. That way PWM4A can not be affected, and PWM4B can be set to some known state.
Are you needing to change what TZA is during runtime then?
Best,
Ryan Ma
I want to change during run time, it's like one is for break and another one is for control single switch Buck converter (which is power supply source for some of the on board components).
Hi Divyesh,
Have you tried changing the TZCTL[TZA] during runtime? I have tested this with changing the register bits of TZCTL[TZA] where I set it first to 0x10 (output low), then set the TZFRC[OSHT] = 1. The outputs were brought to low, then I cleared the OSHT flag with the TZCLR[OSHT] = 1. Then I changed the TZCTL[TZA] to be 0x11 (output to not be changed (resume operation)) and forced a one shot condition through software and only output B went low and output A resumed it's operation. I did this through the register view within CCS,
Best,
Ryan Ma
Yes, I am trying that only before this but I don't know why it is not working and don't go with the name PWMDAC It's a just define like that it's working like pwm only
and with this operation whenever I forcefully set OST it's triggered both the Output.
I am using instaspin library.
Hi Divyesh,
Let me contact the Instaspin library owner on this and get back to you. I know the TZCTL is EALLOW protected, have you tried doing this around that function call?
EALLOW;
EDIS;
Best,
Ryan Ma
Hi Divyesh,
Could you send me a screenshot of your register view when debugging (with the epwm regs you're expecting to have a different trip output) when it steps through lines 2182/2183 and 2198/2199?
You should be able to see TZA / TZB change their values.
Best,
Ryan Ma