2026-05-22 8:16 AM
Hello,
I have been using the hrtim hardware on a prototype board with STM32G474RE and have noticed what might be a possible regression in CubeMX.
Purpose:
We are a group of students currently trying to develop FOC from scratch for controlling a BLDC-motor, this is a part of a bachelors thesis. As a part of developing the FOC we decided to use six-step commutation to start the motor before the FOC takes over. During the part of developing the commutation we have notice some strange behaviour between cubeMX versions.
The problem:
We are experiencing signal inversion with V6.17.0 of cubeMX with the exact same files pulled from the git repo. Either the migration fails for some reason or there is some sort of regression when it comes to the the configuration in CubeMX.
6.16.1:
Picture 1
6.17.0:
Picture 2
Difference in files and a mention of a customer report:
When looking at the difference between the .ioc, hrtim.c and stm32g4xx_hal_hrtim.h in the terminal(Picture 3) there is a few things to remark:
Picture 3
2026-05-22 8:19 AM - edited 2026-05-22 8:49 AM
Hello @EchoExplorer
I am moving this question to the appropriate team for additional guidance.
PS :A known limitation has been detected in the HRTIM of the STM32G474. Please see the link below.
Solved: HRTIM1, TIMA output2 configuration issue - STMicroelectronics Community
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.