You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with stm32f303cbt6 mcu under STM32duino. I created BLDCDriver3PWM driver in arduino code. The phA is PB13, phB is PB14, phC is PB15. When I used DEBUG mode, I got the following infos:
TIM1-CH1N TIM1-CH2N TIM1-CH3N score: -3
TIM1-CH1N TIM1-CH2N TIM15-CH1N score: -3
TIM1-CH1N TIM1-CH2N TIM15-CH2 score: -3
TIM1-CH1N TIM15-CH1 TIM1-CH3N score: -3
TIM1-CH1N TIM15-CH1 TIM15-CH1N score: -3
TIM1-CH1N TIM15-CH1 TIM15-CH2 score: -3
STM32-DRV: no workable combination found on these pins
STM32-DRV: ERR: not find Best Timer Combination
MOT: Init not possible, driver not initialized
It seems that the library cann't find the best timer combination. According to the STM32F303CBT6 datasheet, TIM1_CHIN TIM1_CH2N TIM1_CH3N should be found and used as pwm output.
When I change the phA phB phC to PA4 PB0 PB1, I got the follwing debug infos. And the motor worked fine.
We don't support using the negated channels for anything except the low-side output in 6-PWM mode.
So for high-side PWM outputs in 6-PWM, and all the other modes except 6-PWM, you have to use non-negated channels (the ones without the 'N' at the end).
While it would theoretically be possible, it would add even more complexity to the already very complex stm32 PWM driver.
If someone wants to give it a try, we would consider pull-requests, but I currently have no plans to implement it myself.
runger1101001
changed the title
[BUG]BLDCDriver3PWM driver cann't initialize using STM32duino
[ENHANCEMENT] BLDCDriver3PWM driver can't use negated PWM outputs
Oct 6, 2022
runger1101001
changed the title
[ENHANCEMENT] BLDCDriver3PWM driver can't use negated PWM outputs
[ENHANCEMENT] (STM32) BLDCDriver3PWM driver can't use negated PWM outputs
Oct 6, 2022
I am working with stm32f303cbt6 mcu under STM32duino. I created BLDCDriver3PWM driver in arduino code. The phA is PB13, phB is PB14, phC is PB15. When I used DEBUG mode, I got the following infos:
TIM1-CH1N TIM1-CH2N TIM1-CH3N score: -3
TIM1-CH1N TIM1-CH2N TIM15-CH1N score: -3
TIM1-CH1N TIM1-CH2N TIM15-CH2 score: -3
TIM1-CH1N TIM15-CH1 TIM1-CH3N score: -3
TIM1-CH1N TIM15-CH1 TIM15-CH1N score: -3
TIM1-CH1N TIM15-CH1 TIM15-CH2 score: -3
STM32-DRV: no workable combination found on these pins
STM32-DRV: ERR: not find Best Timer Combination
MOT: Init not possible, driver not initialized
It seems that the library cann't find the best timer combination. According to the STM32F303CBT6 datasheet, TIM1_CHIN TIM1_CH2N TIM1_CH3N should be found and used as pwm output.
When I change the phA phB phC to PA4 PB0 PB1, I got the follwing debug infos. And the motor worked fine.
TIM3-CH2 TIM1-CH2N TIM1-CH3N score: -3
TIM3-CH2 TIM1-CH2N TIM3-CH4 score: -3
TIM3-CH2 TIM1-CH2N TIM8-CH3N score: -3
TIM3-CH2 TIM3-CH3 TIM1-CH3N score: -3
TIM3-CH2 TIM3-CH3 TIM3-CH4 score: 1
TIM3-CH2 TIM3-CH3 TIM8-CH3N score: -3
TIM3-CH2 TIM8-CH2N TIM1-CH3N score: -3
TIM3-CH2 TIM8-CH2N TIM3-CH4 score: -3
TIM3-CH2 TIM8-CH2N TIM8-CH3N score: -3
STM32-DRV: best: TIM3-CH2 TIM3-CH3 TIM3-CH4 score: 1
STM32-DRV: Configuring high timer 3
STM32-DRV: Configuring high channel 2
STM32-DRV: Configuring high timer 3
STM32-DRV: Configuring high channel 3
STM32-DRV: Configuring high timer 3
STM32-DRV: Configuring high channel 4
STM32-DRV: Restarting timer 3
MOT: Init
MOT: Enable driver.
I think some bugs is hiding in the stm32_mcu.cpp, but I don't know where are they.
The text was updated successfully, but these errors were encountered: