Skip to main content
Xxoyo.1
Associate III
June 26, 2021
Question

PWM Timer Slave not getting triggered by Master

  • June 26, 2021
  • 3 replies
  • 2259 views

Hello, I am trying to set timer 3 as a master to timer 1 without success.

Timer3 is outputting the PWM correctly, but timer1 is not getting triggered by Timer3's PWM Signal. What else am I missing?

My board is STM32F429 discovery

Here are my settings timer settings:

Master (Timer 3) Pwm Frequency = 10Hz, Pulse Width 40% of Arr

Slave (Timer 1) Pwm Frequency = 5000Hz, Pulse Width 50% of Arr

Timer1 is triggered by Timer3 using Gate Trigger:

0693W00000Bc447QAB.png0693W00000Bc442QAB.png0693W00000Bc44CQAR.png 

Blue line is timer 3 , which is outputting 10Hz Correctly

0693W00000Bc455QAB.png 

Update: :After doing more test with the Settings, I finally found that the trigger out event in Timer3 should actually be OC1REF. I got the wave form I wanted, however I dont know why the duty cycle in the first pulse of TIMER 1 is wrong. See picture (Purple line: first pulse width is longer than the other's)... Anyone know why / how to fix this?

If anyone interested , I can email you the source code :), I just hope to solve this problem!

0693W00000Bc4XsQAJ.png 

Update 2: Problem solved. Fiddled with the settings and gone through a trial & error process , finally got the waveform i wanted

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
June 26, 2021

TIM1 without Gate mode works properly?

Read out and check/post both TIM and relevant GPIO registers content.

JW

Xxoyo.1
Xxoyo.1Author
Associate III
June 26, 2021

if TIM1 is not config as slave mode, it is able to produce the 5Khz pwm signal.

so I haven't missed any obvious codes? Like needing to enable something etc?

waclawek.jan
Super User
June 28, 2021

Read out and check/post both TIM and relevant GPIO registers content.

JW