STM32G474 - Hardware-only 6-Step Commutation with TIM1 + Hall Sensors (No CPU ISR, No MC Workbench)
Hello,
I'm using STM32G474 to implement 6-step trapezoidal BLDC control and want to achieve full hardware-only commutation, without CPU ISR or software toggling.
Setup:
MCU: STM32G474
Timer: TIM1 (PSC = 169, ARR = 66 → PWM 15 kHz)
Mode: PWM1, edge-aligned
Outputs:
CH1 → PC0 (HU), CH1N → PA7 (LU)
CH2 → PC1 (HV), CH2N → PB0 (LV)
CH3 → PC2 (HW), CH3N → PB1 (LW)
Low-sides must be ON (not PWM) when active
Hall sensors: PA0 / PA1 / PA2 (currently polled)
Goals:
Commutation handled 100% by hardware (TIM1 + DMA/EXTI if possible)
No CPU ISR or software to switch outputs during commutation (only supervision allowed)
At each Hall change, TIM1 must autonomously switch active phase pair
Issues:
MC Workbench forces both high/low-side in PWM, incompatible with 6-step where low-sides must be always ON
MC Workbench requires software-managed commutation
Questions:
Can I route Hall changes (via EXTI or similar) to trigger TIM1 update/DMA to reconfigure outputs automatically?
Is DMAMUX or other peripheral routing usable to feed TIM1 with pre-configured commutation tables without CPU ISR?
Does HRTIM support such hardware-only 6-step commutation natively (better than TIM1)?
Any ST example or app note for this configuration?
Thanks in advance for your help.
