cancel
Showing results for 
Search instead for 
Did you mean: 

Can STM32H743 (With TIM1/TIM8) control two 3-ph Inverters?

Yvo
Associate II

Hi everyone,

Thanks in advance for your time.

Im starting my first application in ST: a power converter controller.

I need to be able to control two three-phase inverters with SPWM modulation, for which I think STM32H743 is the microcontroller I need. It has (as many others) advanced control timers TIM1 and TIM8, but I have a doubt about them:

Can each of them generate THREE PWM signals phase-shifted 120º modulated by SPWM, PLUS THREE complementary, for a total of 6? (For example, TIM1_CH1, TIM1_CH1N, TIM2_CH2, TIM1_CH2N, TIM1_CH3, TIM1_CH3N). And same with TIM8 for another 6?

As far as I understood, each timer can only generate ONE pulsed signal in all of its channels AND its complementary on its CHX_N channels.

Any help, contact or guide will be appreciated since I'm a M.Sc. Student and this is for my master thesis.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
rpip.1
Associate III

Yes TIM1 can generate 3  phase-shifted 120º pwm. complementary signal is produced by corresponding CHxN channel . PWM work in Upcounting mode , toggle mode, setting in OCxM. then set each CCRx to 1xa 2xa 3xa . for example ccr1 = 900 ccr2 = 600 ccr3 = 300 , then generate 3  phase-shifted 120º pwm. for modulated by SPWM , you can use dma to map a series CCRx to each CCRx register.

View solution in original post

10 REPLIES 10
Cristiana SCARAMEL
ST Employee

Hello @Yvory Sahjit García García​,

since your question is about STM32 MCU, I moved your thread from the topic PMMC to "STM32 MCUs Products".

If you feel a post has answered your question, please click "Accept as Solution"
rpip.1
Associate III

Yes TIM1 can generate 3  phase-shifted 120º pwm. complementary signal is produced by corresponding CHxN channel . PWM work in Upcounting mode , toggle mode, setting in OCxM. then set each CCRx to 1xa 2xa 3xa . for example ccr1 = 900 ccr2 = 600 ccr3 = 300 , then generate 3  phase-shifted 120º pwm. for modulated by SPWM , you can use dma to map a series CCRx to each CCRx register.

Toggle mode only produces a signal with a constant 50% width, and that is not a PWM!

What is SPWM?

Show us the expected waveform, indicating what should be variable.

JW

Curtis B.
Senior

I think he means Space Vector PWM. Can be done with one timer and 3 PWM channels...

> I think he means Space Vector PWM.

Okay, so that's just another way of saying "3 PWMs with the same period but independent width and phase".

> Can be done with one timer and 3 PWM channels...

How?

And what do you mean by "PWM channel" - a standard TIM capture-compare channel?

JW

@Curtis B.​ 

Yvo
Associate II

Hi, all

@Community member​ , with SPWM I mean Sine-Pulsed Width Modulation (https://ieeexplore.ieee.org/abstract/document/5489272), the kind of modulation which varies its duty ratio following a sinusoidal function and which is the result of compairing an up-down carrier with a sinusoidal signal. If the same carrier is compared with three sinusoidals phase-shifted 120º, the result is a three-phase SPWM able to control a 3-phase power converter. The signals are presented in the following picture:

0693W000008x5FfQAI.pngI've found out that TIM1 and TIM8 are suitable exactly for that kind of modulation, since the counter does the carrier shape, and the comparators of each channel CCR1, CCR2 and CCR3 can be a sinusoidal function with an arbitrary amplitude and frequency.

Thank you all for your help!

Curtis B.
Senior

Ok, my bad :D

@Community member​ : I use center aligned TIM1 with 3 PWM Generation channels. I have a few lines of code that determine the sector depending on the desired u_alpha, u_beta, and calculate the neccessary CCRx values.

What is sector?

Can you give me concrete numbers, content of ARR and CCRx? We are getting off-topic here so maybe starting a new thread or privately...

Thanks.

JW