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.
Luke,
One other idea that I believe would work for you would be to use the trip zone inputs:
First configure a OSHT trip zone such that it makes PWM1A and 1B (for example) go to Hi-Z on a trip event. You could then, via software, cause a trip zone event. The next step would then be to have the GEL file write to this 'force a trip' address 'on Halt'.
---
As an aside, this would also be how I would recommend handling other faults that your software may see. So understanding the trip-zone submodule's functionality may be beneficial for other reasons as well. :)
Thank you,
Brett
Hi Brett,
Thanks for your help on this issue. I ended up using your suggestion and used a software trip zone event. I was really hoping for some solution where if suspend or terminate were clicked, a trip zone event would be triggered. OnHalt() has very little documentation available and it seems janky at best. The current workaround is OK, however, I know there will be many switches damaged due to students forgetting to set the software flag before clicking suspend or terminate. If there's somewhere to request features in upcoming releases, I would like to see this in there. Most users working with switching power supplies are going to run into this same issue.
Thanks again,
Luke
Luke,
I wasn't aware the project was largely educational in nature, and I now understand the concern. I have a potential idea that I've seen done in someone else's code based on OnHalt (I think). I'll see if the person that did it is willing to share. I'll report back if I hear something positive.
Thank you,
Brett
Dear Luke,
Brett asked me to send you this GEL file. We use it in our digital power design workshops to stop the students from blowing up the boards by accidentally halting the debugger.
We have edited the OnHalt() section to take the PWMs to 3 ticks on halt. I think it takes the PWM A channel Low and B Channel High for complimentary PWM but I am not sure. Anyway if you look at the file you should be able to edit it to make it behave in the way that you want it.
Please note that it takes about 30ms to act. For a motor control application this should not be a problem.
You can download from:
www.biricha.com/downloads/f28335.gel
Hope this helps
Regards
Dr Ali Shirsavar
Biricha Digital Power