2016-05-09 10:30 AM
Hello,
I m configuring STM32F303xx processor for driving BLDC motor driver IC.I have read the datasheet of the same processor.From that i found that we can use TIM1 in Combined PWM mode (for driving 3-Phase BLDC motor).But i m confused. There is one more mode as ''6-step PWM generation''.So, Plesae suggest me which mode we can use for driving BLDC motor. #3phase-bldc2016-05-09 11:33 PM
When switching the H-bridge, you need to ensure that the upper MOSFET is off before the lower is turned on to avoid short-circuiting your supply. This is called dead-time insertion.
Some driver ICs like ST's L6234 have automatic dead-time insertion. In this case a straight-forward PWM can be used which is supported by any timer. Otherwise, you need to use the advanced timers like TIM1 / TIM8 to handle the dead-time insertion from the STM32F303xx. Hope this helps, - Kristian.2016-05-14 03:35 AM
Hi,
Yes, i m going to use driver ic L6230, and it also has dead time facility. So, i m going to use TIM1 for that. And In which mode i should configure the timer? Combined PWM mode , right?2016-05-14 08:04 AM
You should be able to just use the basic PWM mode. Setting the CCRn registers defines the duty cycle and hence the effective voltage over each motor coil. I have some old example code that does this:
https://github.com/knielsen/stm32f4_motor_test/blob/master/main.c
I haven't used combined PWM mode, but if I understand correctly it does not make much sense to use it with the L6230. Since the L6230 has internal logic that controls both upper and lower MOSFET from a single input inX.