cancel
Showing results for 
Search instead for 
Did you mean: 

Hello. I have STM32F334 MCU on Discovery board and I want to control two mosfets by alternately switching PWM channels (like on the picture).

sc0ffer
Associate

 0690X000006CuzXQAS.gifPWM channel 01 controls Mosfet 1, PWM 02 - Mosfet 2. Also I need to insert dead time (dt) between channel switches. My MCU has HRTIM. Is there any way to solve this task using HRTIM? If it possible, what is the best way to reduce IRQ count to reach waveform (sine) generation stability (use DMA or something else)?

3 REPLIES 3
S.Ma
Principal

difficult to know which way would be the most efficient. is a pulse corresponding to a timer full period?

With DMA, you could generate a train of pulses with muted time for each channel.

Or use 2 timers each one generating a pulse and triggered by other timers generating the "timer enable" timewindow... What are the dT value range, the pwm period and the active time of each PWM. Are PWM duty cycle dynamically changing?

Yes, i plan to change duty cycle to get sine waveform.

OGhis
Associate III

Hi,

do you have found a solution to change the duty cycle from a DMA to generate a sine waveform?