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.

Generate interleaved short PWM pulse

Hello,

I'm using Concerto and I have to generate

short (respect to the period) pulses to drive half bridge.

This pulses have to be 200ns wide and the modulation is

by means of pulse frequency (from 1kHz to 30kHz).

Now I use one EPwm peripheral where time base counter is in UP-DOWN mode (TBPRD = 150MHz / "desired frequency" / 2) and CMPA is used to generate D2 pulse (set is this way CMPA = 200ns x 150MHz / 2) and CMPB is used to generate D3 pulse (set as CMPB = TBPRD - CMPA).

This solution is not the best because it presents a problem that I want to left over:

when it's time to change the frequency I have to change two registers (TBPRD and CMPB) simultaneously

to avoid the case EPwm peripheral generate a waveform with a CMPB value not coherent to TBPRD.

Has someone a solution ?