cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32h750vbt6 hrtim center aligned mode

Zain
Associate III

I am using stm32h750vbt6 for pmsm foc. I want to know if there is a way to use hrtim in center aligned mode as it would be needed for svpwm.

Right now I'm updating the duty cycle with the following settings.

Set comparator value: counter value/2 - duty/2

Reset comparator value: counter value/2 + duty/2

And I'm updating on timer update event.

Is there any suggestions or I'm doing it right?

 

5 REPLIES 5

Hello, 

The HRTIMER counters can operate in Up‐Down counting. This mode presents advantages for fixed switching frequency power converters. The HRTIM is natively designed with up-counters. It offers however an operating mode with up-down counters, also called center-aligned mode.

You can configure it by STM32CubeMx: "Up Down Mode",

 

Best regards.

I am using stm32h750vbt6, does this mcu has center aligned mode in hrtim because i dont see any option in stm32cubemx for it.

Zain_0-1725426893807.png

 

Hello, 

Yes indeed, this feature is available for STM32G4 chip which contains an Hrtim version different from the one in h7.

 

Best regards.

I am talking about stm32h7 here, So kindly tell me if the solution i provided for center align in stm32h7 will work for me?

Hello, 

Yes, this sounds correct, if the computation of SET/RESET events could be done fast enough regarding the PWM period.

Please, notice that enabling the preload of registers is a good practice, allowing the update to be taken in next update event and to ensure a coherency in registers values.

Best regards.