cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 F7 combined PWM

mailmail9114
Associate II
Posted on June 14, 2016 at 11:54

Hi,

i try to implement an PWM with high pulse between two CCRx reg values.

E.g. TIM8:

Period  = 100;

CCR1 = 20;

CCR2 = 25;

-> create one PWM Signal with

pwm pin output low  0-19

pwm pin output high 20-25

pwm pin output low  26-100

is this possible with STM32 F746 and cube?

perhaps as combined PWM ? thanks!

5 REPLIES 5
Posted on June 14, 2016 at 13:03

> is this possible

Not in this form, but how would the resulting waveform differ from one which is high between 0 and 5 and low above that until reload at 100?

JW

mailmail9114
Associate II
Posted on June 16, 2016 at 08:39

Hi,

the problem is that this timer is triggered by an other timer which also produces several signals and DMA ADC sampling..

so it would be much easier if I could do such PWM.

are there some possibilities to create this pwm?

thanks!

Posted on June 16, 2016 at 09:11

Again, not in this form, but you can delay the trigger at its source.

JW

mailmail9114
Associate II
Posted on June 16, 2016 at 09:37

ok - thanks

mailmail9114
Associate II
Posted on June 17, 2016 at 10:23

Hi,

ive succuessful solved this problem with combined PWM. 

Channel 1:

sOCConfig.OCMode      =TIM_OCMODE_COMBINED_PWM1;

HAL_TIM_PWM_ConfigChannel(&TimSlave2Handle, &sOCConfig, TIM_CHANNEL_1)

Channel 2:

sOCConfig.OCMode      =  TIM_OCMODE_PWM2 ;

HAL_TIM_PWM_ConfigChannel(&TimSlave2Handle, &sOCConfig, TIM_CHANNEL_2)

bye