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.

TMS320F280049: PWM counter comparator shadow mode

Part Number: TMS320F280049

Hi, I am wondering if using shadow mode will delay the control, for example, in the attached diagram, if ADC start of conversion at t0, ready at t1, new duty ratio is ready at t2, if use Immediate mode, current switching cycle is updated with new duty, but if use shadow mode, new duty won't implemented until t4. That is one switching cycle delay. so what is the benefit/ occasion for shadow mode?

Thanks!

  • Hi Shengnan,

    Shadow mode is necessary in almost all cases due to the way the EPWM uses a counter value compared with CMPA/CMPB to control the output. I'll describe an example that demonstrates the risk of using immediate mode.

    • EPWM period of 500
    • initial CMPA value of 300
    • output high on 0, low on CMPA

    Sequence of events:

    • EPWM counts from 0 to 250
    • Software updates CMPA from 300 to 200, but the EPWM TBCTR is already greater than 200
    • The output will stay high for 100% of the period, and not go low again until TBCTR=200 in the next cycle

    When using shadow mode, the next CMPA value will not take effect until the beginning of the next cycle, which eliminates the risk of 100% or 0% duty cycles due to the asynchronous software updating of CMPA.

    Let me know if you have any further questions.