stm32f103c8t6延时ms
时间: 2023-09-08 21:09:46 浏览: 125
STM32F103C8T6 学习代码
要在STM32F103C8T6上进行毫秒级延时,可以使用Delay_ms函数。该函数通过调用Delay_us函数实现,其中Delay_us函数使用SysTick定时器进行微秒级延时。以下是Delay_ms函数的代码:
```c
void Delay_ms(uint32_t xms) {
while(xms--) {
Delay_us(1000);
}
}
```
通过调用Delay_ms函数并传入所需的延时时间(以毫秒为单位),即可实现延时操作。请注意,该延时函数的精度可能会有一定的误差,但不会影响使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [STM32F103延时函数](https://download.csdn.net/download/pingdangjun/9434542)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [STM32F103C8T6延时函数和OLED显示屏代码](https://blog.csdn.net/HX091624/article/details/127398287)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [STM32F103C8T6.zip](https://download.csdn.net/download/CJH_12345_/12416461)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文