Hi TI team,
I used for triggering SOC PWM, but I need to add some delay (200 us) between rising edge of PWM and SOC. Could you please help me, how to do it in correct way?
Regards!
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 TI team,
I used for triggering SOC PWM, but I need to add some delay (200 us) between rising edge of PWM and SOC. Could you please help me, how to do it in correct way?
Regards!
Hello Oleg,
In you use case, which event of the following events is used for generating rising edge of PWM?
CTR=zero, CTR=PRD, CTR=CMPA, CTR=CMPB, T1, T2, SW force
EPWM SOCA/SOCB events can be generated using DCAEVT1.soc, CTR=zero, CTR=PRD, CTRU/D=CMPA/B, CTRU/D=CMPB/CMPD
You may configure one of the CMPA/B/C/D events with an offset of 200us (with respect to the event used for rising edge generation) and use it to generate EPWM SOCA/SOCB.
For example:
If CTR=zero is used to generate rising edge, you may configure CMPA as 40000 (40000*5ns = 200,000ns) and configure ETSEL[SOCASEL], ETSEL[SOCASELCMP] to select CMPA as source for EPWM SOCA.
Thanks
K.Sanjeev
Hi Sanjeev Karaiyan!
I need to measure ADC with period (PWM_period / 4) per PWM_period, and I need need some delay between rissing edge of PWM and measurement. I am looking for the best and simplest method.
I think the best choice will be triggering ADC from another PWM, wich will working in another frequency as described here: e2e.ti.com/.../4855865
If you agree about this solution I will close this ticket.
Thanks for your answer.
Regards!
Hello Oleg,
Is the rising edge of PWM generated at a fixed point of time within every PWM period? (example: start of PWM cycle (CTR=0) or a fixed CMPA/CMPB)
Or is the rising edge of PWM modulated every cycle? (example: by updating CMPA/CMPB every PWM period)
If it is fixed for every PWM cycle, then I agree with this solution. A second EPWM (running with period/4 and synced to EPWM1) can be used to generate ADC SOC triggers to sample 4 times per period.
Thanks
K.Sanjeev