我想用STM32F051 TIM17产生两路带死区的互补pwm,互补pwm出来了,但死区没有,不知道哪位大神有经验? TIM_TimeBaseStructure.TIM_Period = 4095; TIM_TimeBaseStructure.TIM_Prescaler = 11485;//11719; TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseStructure.TIM_RepetitionCounter = 0; TIM_TimeBaseInit(TIM17, &TIM_TimeBaseStructure); TIM_ARRPreloadConfig(TIM17, ENABLE); TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1; TIM_OCInitStructure.TIM_Pulse = 1000; TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; TIM_OCInitStructure.TIM_OutputNState = TIM_OutputNState_Enable; TIM_OCInitStructure.TIM_OCNPolarity = TIM_OCNPolarity_High; TIM_OCInitStructure.TIM_OCIdleState = TIM_OCIdleState_Set; TIM_OCInitStructure.TIM_OCNIdleState = TIM_OCIdleState_Set; TIM_OC1Init(TIM17, &TIM_OCInitStructure); TIM_OC1PreloadConfig(TIM17, TIM_OCPreload_Enable); TIM_BDTRInitStructure.TIM_OSSRState = TIM_OSSRState_Enable; TIM_BDTRInitStructure.TIM_OSSIState = TIM_OSSIState_Enable; TIM_BDTRInitStructure.TIM_LOCKLevel = TIM_LOCKLevel_OFF; TIM_BDTRInitStructure.TIM_DeadTime = 500; TIM_BDTRInitStructure.TIM_Break = TIM_Break_Disable; TIM_BDTRInitStructure.TIM_BreakPolarity = TIM_BreakPolarity_Low; TIM_BDTRInitStructure.TIM_AutomaticOutput = TIM_AutomaticOutput_Enable; TIM_BDTRConfig(TIM17, &TIM_BDTRInitStructure); TIM_ARRPreloadConfig(TIM17, ENABLE); TIM_Cmd(TIM17, ENABLE); TIM_CCPreloadControl(TIM17,ENABLE); TIM_CtrlPWMOutputs(TIM17, ENABLE); |
stlink V3mini 调试器不能识别stm32f030F4P6芯片,有解决办法吗?
STM32F0 SMBus 中断怎么开启
STM32F072 无法清除EXTI4_15_IRQn pending标志,导致无法进入stop模式
基于GCC编译器的initcall在STM32如何实现?
想找一款pin to pin的MCU(参考STM32F105RC),支持CAN FD的,64PIN封装,各位小伙伴们有推荐吗
L9663如何使用上行缓冲区发送同步脉冲
如何使用定时器在任意IO输出PWM
下载到flash无法运行,开调试就能成功,是什么问题?
STM32是小端模式,但为什么Keil中memory窗口和反汇编窗口的32位指令不一致?
各位朋友,有没有STM32F0系列教程,最好是汇编语言的。
TIM_BDTRInitStructure.TIM_DeadTime = 500; 这个值太大了。
我用的设置是TIM_BDTRInitStructure.TIM_DeadTime = 11