cancel
Showing results for 
Search instead for 
Did you mean: 

How to use PWM function of Tim1 on STM32F1 to produce 6 steps trapezoidal scheme PWM wave?

MWang.6
Associate

Pleaese give me some idea for this control theory. The output pin should be PWM_A/_B/_C and RESET_A/_B/_C as shown on picture. If I give specific duty cycle and frequency, how to impleme0690X000006CxxPQAS.pngnt it ?

1 REPLY 1
S.Ma
Principal

First, as not specialist of motor control, would say to look at motor control applications. The motor control boards are called IHMxxx if I remember well.

There might be different ways to implement.

One that I used to control analog switches around op-amps is using TIMER + COMPARE OUTPUT TOGGLE mode with DMA looping through a user defined compare RAM table. The timer was one shot kicked in from a trigger event signal. Depending on the STM32, the number of timers with DMA on compares maybe limited or not.

For the reset pins, it's a bit simpler, so there should be various ways to generate them.