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.

CCS/TMS320F280049: PWM generation

Part Number: TMS320F280049


Tool/software: Code Composer Studio

Dear team

My customer wanted to generate PWM wave as the following picture.

In the previous interrupt, a narrow pulse is generated; the next interrupt generates a wide pulse, the same comparison value is applied.

They tried to modify the output polarity without success.

Please help.

  • Double your period value.

    Now every one of the triangles is 2x wider.

    On the CTR increasing to PRD value, set CMPA to the value for the short pulse, CMPB = PRD-CMPA.

    Output A goes high at CTR=ZERO and LOW at CTR=CMPA.

    Output B goes high at CTR=CMPA and LOW at CMPB.

    On the CTR decreasing (down count),

    Output B goes high at CTR=PRD and LOW at CMPB

    Output A goes high at CTR=CMPB and LOW at CMPA.

    You dont ever have to change the setting now. It will automatically create the waveform you want.

    Nima