<p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun">TIM_HandleTypeDef TIM3_Handler; //定时器句柄 </font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun">void TIM3_Init(u16 arr,u16 psc)</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun">{ </font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> TIM3_Handler.Instance=TIM3; //通用定时器3</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> TIM3_Handler.Init.Prescaler=psc; //分频</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> TIM3_Handler.Init.CounterMode=TIM_COUNTERMODE_UP; //向上计数器</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> TIM3_Handler.Init.Period=arr; //自动装载值</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> TIM3_Handler.Init.ClockDivision=TIM_CLOCKDIVISION_DIV1;//时钟分频因子</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> HAL_TIM_Base_Init(&TIM3_Handler);</font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> </font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun"> </font></p><p style="box-sizing: border-box; outline: 0px; margin-bottom: 16px; overflow: auto hidden; line-height: 24px !important;"><font color="#4d4d4d" face="-apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif, SimHei, SimSun">}</font></p>
———————————————— 版权声明:本文为CSDN博主「似是燕归来」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/s2014201506/article/details/117838129