Other Parts Discussed in Thread: MSPM0C1104, SYSCONFIG
Tool/software:
I'm migrating a STM32 M0 core to the MSPM0C1104 for a SMPS control using PWM modulation on a 2 switch push-pull topology.
I need to update the duty cycle accordinggly at the control sampling time, wich is much larger than PWM period.
Initially I controlled both PWM channels duty cycle manually.
It works quite well, but at some moments the Counter Compare seems to load a wrong value or no value at the Register
and the PWMs have a distorted pulse, sometimes overlaping its outputs, causing the SMPS to fail.
Is there any way to force a safe load to the Compare Register so it always updates correct? Or a better practice to achieved this application.
So far I've tested a few alternatives with no success:
Increased largelly the control sampling time to avoid any Interrupt priority problem or calculation time.
Tested the Deadband mode, uptadating the deadband to get the desired duty cycle, and it shows the same sporadic problem.
A test code with no interrupts or control, only duty cycle updating, and it shows the same problems as the ported code.
.syscfg file has an option to select the Channel Update Mode but it only allow me to use the option "Capture Compare value has immediate effect", saying it only works on TIMA0 but I'm already using TIMA0 for this code.
Bellow are some pictures of the PWM behaviour.
Thank you for the support

