Hi,
I’m using my NUCLEO STM32F302R8 board to run the open_loop_velocity_example, but the serial didn’t work and the motor can not run.
I found my problem similar to NUCLEO STM32F302R8 can not run. So I changed the pins into (PC0, PC2, PC3, PA9),which all uses TIM1, now the serial worked perfectly, but the motor still didn’t run.
So I tried the BLDC_driver_3PWM_standalone project, with the setting of (PC0, PC2, PC3, PA9), but the voltages of PWM A\B\C are all 12V, which is the same as the power supply voltage. This result was not ideal since my code was
driver.setPwm(3,6,5);
I tried other combination of pins,but none of these worked well, such as:
PC0, PC2, PC3, PA9
(TIM1-CH1 TIM1-CH3 TIM1-CH4 TIM1-CH2)
Output:12V,12V,12V
PC0, PA9, PC2,PC3
(TIM1-CH1 TIM1-CH2 TIM1-CH3 TIM1-CH4)
Output:6.62V,6.73V,7.54V
PA8, PA9, PA10,PA11
(TIM1-CH1 TIM1-CH2 TIM1-CH3 TIM1-CH4)
Output:8.08V,8.16V,8.64V
BTW, I’m not sure if the sequence of the timer channel settings has influence on the output,for example:(TIM1-CH1 TIM1-CH3 TIM1-CH4 TIM1-CH2)&(TIM1-CH1 TIM1-CH2 TIM1-CH3 TIM1-CH4), does the sequence has to be (CH1 CH3 CH4 CH2)?
Also, I tried the TIM2 pins, but this time the code stopped at driver.init()
PA0, PA1, PA3, PB10
(TIM2-CH1 TIM2-CH3 TIM2-CH4 TIM2-CH2)
Output:1.471V,1.474V,2.021V
I also tried to remove file stm32_mcu.cpp completely and remove line 11(mine is 13) from generic_mcu.cpp . It didn’t change anything.
I hope that I provided enough information and I am looking forward to a reply.
Greetings,
Hsia