Other Parts Discussed in Thread: CONTROLSUITE
Hi,
I am using ADC channel for measurement of voltage and current.
How can I make low pwm (or off PWM) using comparator module.
What setting I should have to do?
-Sagar
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.
Hi,
I am using ADC channel for measurement of voltage and current.
How can I make low pwm (or off PWM) using comparator module.
What setting I should have to do?
-Sagar
Hi Sagar,
Can you clarify your question?
Hi Frank,
I am using ADC channel for current (ADC A2).I am sensing ac current.Signal is dc level shift by 1.65V. If adc result is not in between of 500 and 3500 value then pwm will be off. I think we can use cmpss (compare sub system ) for operation.I need example for the same.I gone through cmpss_async example but it is only for high comparator.
Regards,
Sagar Yadav
Frank,
Thanks for reply.
I am using EPWM1a & 1b for my application. ADCA2 for current read. I am using Comparator1 subsystem also.
Comparator output I was assign to EPWMxbar the following way is it correct?
// Configure TRIP4 to be CTRIP1H
//
EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 0;
//
// Enable TRIP4 Mux for Output
//
EPwmXbarRegs.TRIP4MUXENABLE.bit.MUX01= 1;
// Configure EPWM8B to output high on TZB TRIP
//
EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_HI;
//
// Configure DCB to be TRIP4
//
EPwm1Regs.TZDCSEL.bit.DCBEVT1 = TZ_DCBH_HI;
EPwm1Regs.DCTRIPSEL.bit.DCBHCOMPSEL = 0x1;
EPwm1Regs.DCBHTRIPSEL.bit.TRIPINPUT4 = 1;
//
// Configure DCB as OST
//
EPwm1Regs.TZSEL.bit.DCBEVT1 = 1;
Sagar,
You can follow the example in cmpss_asynch. If you want the trip to happen for both cmpssl & cmpssh, change the MUX0 to 1. This will trip for either cmpssl or cmpssh.
//
//Configure TRIP4 to be CTRIP1H or CTRIP1L
//
EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 1;