2021-06-26 01:01 AM
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:
Blue line is timer 3 , which is outputting 10Hz Correctly
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!
Update 2: Problem solved. Fiddled with the settings and gone through a trial & error process , finally got the waveform i wanted
2021-06-26 01:34 AM
TIM1 without Gate mode works properly?
Read out and check/post both TIM and relevant GPIO registers content.
JW
2021-06-26 01:40 AM
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?
2021-06-28 03:36 AM
Read out and check/post both TIM and relevant GPIO registers content.
JW