Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE
Problem Description
I am using the TMS320F280039C microcontroller with multiple ePWM modules configured for HRPWM operation.My goal is to update the compare values in the shadow registers first and then load all values synchronously to the active registers, at least within each ePWM and ideally across multiple ePWM modules.To achieve this, I attempt to temporarily freeze the shadow‑to‑active transfer:
Procedure
- Freeze shadow loading
EPwm1Regs.CMPCTL.all = 0x0F; - CLA updates CMPA/CMPB + HRPWM values
EPwm1Regs.CMPA.all = ((long)cmpa) << 16 | cmpab_hr; - Re‑enable normal shadow loading
EPwm1Regs.CMPCTL.all = 0x0A;
Expected Behavior
Once EPwm1Regs.CMPCTL.all = 0x0F; has been written, the duty cycle should remain constant because new compare values should not be transferred from the shadow registers to the active registers.
Observed Behavior
Even with the Load Mode set to Freeze, the compare values CMPA and CMPB still change, and so does the duty cycle.
Questions
- Are there any additional bits or registers that must be configured to fully freeze the shadow‑to‑active transfer?
Especially in combination with HRPWM and updates performed by the CLA? - What is the recommended configuration to ensure truly synchronous loading of all compare values,
– within a single ePWM module, and
– across multiple ePWM modules?
– ensuring, that even with phase shift between the PWM modules, the shadow-to-active load happens at PRD or ZERO - Are additional HRPWM‑specific settings required so that CMPAHR/CMPBHR are also frozen and loaded synchronously?






(the same applies for 0x0005 instead of 0x000A)