stm32定时器时间计算1ms
时间: 2023-09-10 18:10:28 浏览: 148
stm32定时器时间计算方法
5星 · 资源好评率100%
在STM32中,计算定时器的时间为1ms需要考虑定时器的时钟源频率、TIM_Prescaler和TIM_Period等参数。根据引用给出的公式TCK/(psc 1)即为时钟频率,1/f为机器周期,乘以(arr 1)即可得出定时器周期。引用中给出的例子中,时钟周期为1us,定时器的频率为1000Hz,即1ms。根据引用中的参数设置,定时器的时钟源频率为16MHz,TIM_Prescaler为15,TIM_Period为999。所以,根据计算公式,定时器的时间为1ms。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [STM32 定时器定时计算](https://blog.csdn.net/liuqingsongmsdn2014/article/details/127984095)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [STM32定时器的定时时间设置](https://blog.csdn.net/weixin_43869518/article/details/124022614)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文