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.
Hello everyone,
I use an ePWM with CMPA in shadow mode, but sometimes I need to reset it to its default value. In order to avoid waiting until the shadow register is loaded into the active register, I found a method where I do something like this:
ePwm->CMPA.half.CMPA = 0; // write to shadow register (CMPA becomes zero) ePwm->CMPCTL.bit.SHDWAMODE = TB_IMMEDIATE; ePwm->CMPA.half.CMPA = 0; // direct write to active register (CMPAM becomes 0) ePwm->CMPCTL.bit.SHDWAMODE = TB_SHADOW;
This does what I want, but I wonder if it may interfere with the HRPWM. The TRM states in chapter 15.2.4.4.1 that "the TBPRD and CC registers must be configured for shadow loads". If I run the ePWM in high-resolution up-down duty cycle control, then force the CMPA to zero in the manner described above, will it break the configuration of the HRPWM because I put the CMPA in immediate mode for a short while?
Cheers,
Pierre