说明:
TIM1作为主控机,配置为PWM模式,通过更新事件作为TIM3和TIM4的触发源。
TIM3和TIM4作为从机,配置为PWM模式,输入触发源是ITR0,由于使用了门控功能,TIM4和TIM3的启动停止全部由TIM1来控制。
TIM1 频率 = TIM1 counter clock / (TIM1_Period + 1) = 781.250 KHz
占空比 = TIM1_CCR1 / (TIM1_ARR + 1) = 50%
TIM3频率 = (TIM1 frequency)/ ((TIM3 period +1)* (TIM1_Repetition_Counter+1)) = 52.083 KHz
占空比 = TIM3_CCR1/(TIM3_ARR + 1) = 33.3%
TIM4频率 = (TIM1 frequency)/ ((TIM4 period +1)* (Repetition_Counter+1)) = 78.125 KHz
占空比 = TIM4_CCR1/(TIM4_ARR + 1) = 50%
框图:
QQ截图20180822103802.png (7.08 KB, 下载次数: 0)
下载附件
2018-8-22 10:39 上传 |