TI 280x ePWM Trip Zone

13 views (last 30 days)
David
David on 18 May 2011
Commented: tcagdas on 23 Mar 2023
Hi! My question is related with the Real Time Workshop in combination with Texas Instruments processors. I want to configure an ePWM Trip Zone in order to force ePWM1-3 to 'Low' state as soon as I receive a pulse on pin TZ1 (one-shot Trip Zone). So far, this works quite well, but how do I reset the Trip Zone after the error is gone, so the PWM is active again? Do I have to write my own ISR? How can this be done in Simulink? (because my code is generated by RTW) Thanks! David
  2 Comments
David
David on 18 May 2011
just want to add that this is quite important for my diploma thesis as I cannot connect to the frequency converter without this security feature...
tcagdas
tcagdas on 23 Mar 2023
hi can you explain how to use tripzone in simulink?

Sign in to comment.

Answers (1)

David
David on 24 May 2011
All right, as nobody added answer to this question, I can only post my solution, but I don't know if it is the way it should be done: I wrote a standard C-source file and compiled it as a simulink block.
void clear_TRIP(void)
{
EALLOW; // Allow writing to protected registers
EPwm2Regs.TZCLR.all = 7;
EPwm3Regs.TZCLR.all = 7;
EPwm4Regs.TZCLR.all = 7;
EDIS; // Lock registers against writing
}
As the macros EALLOW i.e. refer to assembler commands, I did a tlc function replacement on these commands in order to get the final code right in the CCS project. The simulink version of the code just does 'nothing'.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!