Timer Configuration for a PWM Scheme
Hi All,
I would really appreciate your input to this problem.
I am presently trying to implement the waveform "(a) PWM-ON" shown in figure below
It is for a 6step control algorithm, the STSW-SPIN32F0251 to be exact.
Here is the snapshot of the code that I have implemented for each step

This is the result that I am getting on the output timers that generates output PWM signals.
-->The yellow and green waveforms are the hall sensor input signals. All the three hall sensors signals have been XORed internally in my MCU into a single channel TI1.
-->The blue waveform is the gate signal to the high side of the first leg.
-->The pink waveform is the gate signal to the low side of the second leg.
A zoom in:
Also here is an interesting picture showing the current waveform in pink color. The current decays to 0 between each step due to this delay problem
Now the problem that I would love you to help me with is this:
- There is this delay between the signals on each gate signal waveform (blue and purple). It sort of makes sense since, I use the hall sensor signal edges (rising and falling) to indicate a step (1-6). so at each step, another pulse is produced on the same hall sensor interface timer to use in triggering the configuration changes in the output PWM timer for my gate drivers.
- Hence it makes sense that there would be an initial delay, but after that there should be no delay as explained here in the manual RM0360

So how can I fix this delay?
I kinda think it could be a setting problem on the PWM timer - advanced timer 1. Maybe there is a setting to ensure the signals repeat and not get cleared until the next step.?
Thank you