STM32G4 HRTIM V2.0 possible regression 6.16.1 -> 6.17.0
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:
- HRTIM1 with slave-timers A,B,E are configured to output 6 PWM-signals with dead time configuration and complementary mode for CH2 of each timer.
- The output on the logic analyzer is as expected. It shows a duty cycle of 4.6% on CHA1, CHB1 and CHE1(Picture 1 below).
Picture 1
6.17.0:
- HRTIM1 with slave-timers A,B,E are configured to output 6 PWM-signals with dead time configuration and complementary mode for CH2 of each timer.
- The output on the logic analyzer is not as expected. It shows a duty cycle of 4.6% on CHA1, with CHB1 and CHE1 being inverted(Picture 2 below).
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:
- There is as expected no difference in the .ioc-files and there is no difference in the hrtim.c/.h files
- There is a mention of some swapped values, could this be a cause for the problem?
Picture 3