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.

Timing of changing PWM Shadow/Immediate mode settings

I'm wondering about the timing effects of changing the shadow or immediate mode settings. If I write to a PWM register with shadow mode ON, then change the setting to Immediate Mode, what happens?

For example, let's say I want to remain in Immediate mode most of the time, but only make one change in Shadow Mode. So, starting from Immediate Mode, I have this code:

    EPwm1Regs.AQSFRC.bit.RLDCSF = 00; // Change to Shadow mode
    EPwm1Regs.AQCSFRC.bit.CSFA = 00; // Write setting
    EPwm1Regs.AQSFRC.bit.RLDCSF = 11; // Back to Immediate mode

I assume the first line will take effect before the write. But will the third line then force the write to actually happen in Immediate Mode, or does the write happen in Shadow Mode because that's what the setting was during that line? I am trying to achieve the latter effect.