Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hi,
I am trying to produce a double pulse for the testing of a power device, the first pulse would be HI for a longer amount of time than the second pulse before returning to a LO signal for an extended period of time. This is outlined in the diagram below:
My thinking towards doing this was as follows:
-I can control the PWM and set its duty cycle however, I want to be able to interrupt the PWM after y and z so for the second period the duty cycle can be decreased to allow for the shorter z pulse.
-After this a second interrupt would need to be triggered to keep the PWM output at a LO signal.
-I'm aware that each ePWM module has 4 CMPx's in the CC sub-module, with CMPA and CMPB currently being used to define the duty ratio of the PWM. This would allow me to use CMPC and CMPD, creating an action for the event trigger. I would accomplish this by making the CMPC = TBPRD which at that point (which in counts is equal to x and y) would flag an interrupt, and allow for the duty cycle to be changed to a lower one, creating the second pulse. CMPD would be equal in counts to x + y + z and this interrupt would hold the device from producing a PWM after the pulse a z, until the reset on the launch pad was triggered.
The questions I have are:
- is this scheme viable?
- are there any resources that may help me in learning how to go about implementing these interrupts? as I did not find the interrupt file from the C2000 examples helpful for my understanding.
I am new to using this micro-controller and any guidance to help me produce a solution on my own would be greatly appreciated.
Thank you!