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.
Tool/software: Code Composer Studio
Hello,
I am trying to observe a variable in the graph window. I have added a breakpoint and in "Action" I have selected "Refresh All Windows". But as soon as I enable the breakpoint, PWM Stops. I have set Freerun Flag Also. Is there any other setting we have to do? Please help.
Regards,
Shiv,
If you would like the PWM to continue operation even during a debug halt the only thing you need to do is to set Free,Soft = 11 or 10. The Free,Soft bits can be found in the TBCTL register.
After setting up the PWM please read the TBCTL register of whichever ePWM you are using and provide me the value.
Regards,
Cody
Shiv,
that looks correct, was that value read AFTER you saw the issue? This is very important because something in your code may be changing that value.
Are you observing ePWM 1, if you happened to be observing ePWM2 it may still stop depending on the value in its TBCTL register.
Regards,
Cody
Exactly the same valuew before and after the breakpoint.
EPWM2 is same. Refer the above Image
Regards,
Shiv
Shiv,
that is unexpected, can you send me your .out file? Or at least a .out file from a stripped down version of your code that still shows the error?
Regards,
Cody
Shiv,
have you checked if the PWM is getting forced low by a trip zone signal? I could imagine that a trip zone could trigger quickly after you hit the breakpoint making it look like the PWM stopped at the same time.
Check the TZ flag registers. Additionally you could toggle a GPIO just before the breakpoint and see how much longer the PWM continues, but remember the point of a TZ is to shutdown the PWM output quickly after it detects an event.
Regards,
Cody
Hello Cody,
Is This feature affects Exceution time of the code?
I was toggling a GPIO to understand the ISR Execution. But as soon as I turn on Breakpoint. My execution comes down to milliseconds.
I am running in openloop(LEVEL2) and motor also stops spinning.
Regards,
Shiv
Shiv,
I'm not sure that I understand your question... but yes breakpoints will slow down your execution speed.
Regards,
Cody