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.

Porting LF2407A to to F28020: How to do synchronous PWM updates when registers aren't shadowed

I am porting a customer's motor control code from the LF2407A to the F28020.  Their code relies on ACTRA being shadowed, and updated synchronously each time T1 resets to 0.  This causes the 6 PWM outputs to update synchronously as well.  Their code sequences through a list of 6 ACTRA values, which accomplishes the commutation of the motor.  In the timer ISR, the code figures out where the motor is, and updates the ACTRA and CMPRx registers appropriately, and the changes all take place the next time the counter resets at the beginning of the next PWM cycle.

Unfortunately, the AQCTLA/AQCTLB action qualifier registers in the F28020's ePWM module aren't shadowed, which means if I update them the change happens immediately and not at the beginning of the next PWM cycle.  This is further complicated by needing to use three ePWM modules to run the 6 PWM outputs.  There doesn't seem to be a way to get the 6 PWM outputs to update simultaneously.

Is there a recommended way to do this with the ePWM module?  Our customer's goal is to minimize the technical risk with this port, so rewriting their entire motor control program isn't really an option.

So far, the only workable option I've found seems to be to creatively change the CMPA/CMPB registers (which are shadowed) in a way that mimics the ACTRA behavior.  That would result in a synchronous update of all the PWM outputs, which would match the current system's behavior.  But I wanted to check to see if there's something I missed or a recommended way to deal with this issue when porting code from the LF2407A Event Manager PWM to the F28020's ePWM.

Thank you!