2020-11-07 12:11 AM
2020-11-07 06:00 AM
You should be able to do this with a single timer on CH1 and CH1N channels. Set it for 50% duty cycle and adjust the dead-time to give you different duty cycles. With zero dead time, the channels are opposite, but with nonzero dead time they will be different.
2020-11-08 11:36 PM
Thank you for your answer but if setup the PWM as you suggest I still get the complementary and not the push-pull output that I require:
2020-11-08 11:54 PM
Which STM32?
What are the timing requirements?
Did you try to set deadtime in TIM_BDTR?
JW
2020-11-09 12:23 AM
STM32L476.
25KHz PWM with a variable (internally defined) D/C.
Setting D/C to 1.5uS (120 clock cycles) or leaving it at zero has no effect on the output waveform. It defaults as "complementary"
2020-11-09 01:26 PM
I don't know what is D/C.
If you have a 40us period waveform and observing it with LA or oscilloscope you don't see a 1.5us deadtime between the two waveforms, you have set something incorrectly. Read out and post the timer registers.
You may also describe your timing requirements in more depth. What should be the exact relationship between the two waveforms, what is fixed and what is required to be variable?
In the 'L4, timers already have Combined PWM mode, where output is generated as AND or OR of two adjacent channels, That's useful to generate phase-shifted pulses within one timer, and that is maybe what you need here. Read the TIM chapter in RM.
JW
2020-11-10 01:00 AM
D/C is Duty Cycle. It is expressed in percent.
I want to change the D/C depending on the MPPT point of a 375watt 90Vdc solar panel array feeding a load via a PCB with a full H-Bridge at a frequency of 25KHz.
My system will start off with a low value of D/C, say 5%, and increase the D/C until the MPPT point of the incoming solar array is reached.
I realise that there will be no D/T viewed if the D/C is low as electrically they is no need for it. Approaching the 50% mark the D/T should become visible as per image.
2020-11-10 02:35 AM
This exactly is the purpose of deadtime insertion in the Advanced Timers (TIM1, TIM8).
If you don't see this, there's something wrong in the setup.
Read out and post the content of TIM1 registers.
JW
2020-11-10 05:59 AM
I'm as sure as I can be that this is possible with dead-time generation.