AnsweredAssumed Answered

STM32F446 Timer1 Commutation via Timer2

Question asked by Hubacher.Stefan.001 on Mar 7, 2017
Latest reply on Mar 9, 2017 by Hubacher.Stefan.001

Hi

I try to control a BLDC Motor with TIM1 as the PWM-Generator and TIM2 as the Hall-Interface-Timer.

The TIM2-Setup is done via HAL-API "HAL_TIMEx_HallSensor_Init()"; TIM1 is setup as a 3 channel PWM also via HAL-APIs.

When I generate the Commutation-Event for TIM1 in Software (in CaptureCallback of TIM2), TIM1 is working fine. But when I change the Commutation-Event-Generation in TIM1 to the ITR1 (TRGO from TIM2), the Commutation is never triggered. If I set the Commutation Delay >0, I got many Commutation-Events before I call "HAL_TIMEx_HallSensor_Start()" and also without Hall-Signals (-> System is blocked by IRQ-Calls).

 

Is there an Example with Commutation of TIM1 through another Timer (via ITR)?

 

Best Regards

 

Stefan

Outcomes