3

嵌入式软件设计(定时器中断)

 1 year ago
source link: https://blog.csdn.net/feixiaoxing/article/details/125128309
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

嵌入式软件设计(定时器中断)

费晓行 已于 2022-06-05 07:55:42 修改 30

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing @163.com】

        说定时器是嵌入式系统的心脏,一点也不为过。定时器,不仅使用在rtos领域,在任务的运行、等待、延时、资源的获取方面都有广泛的影响。之前学过外部输入中断,定时器本身一般也是作为中断来进行处理的。

        定时器稍显复杂,可以通过直接阅读代码加以分析。

1、分析main函数

        从代码来看,主要由两部分。一部分是定时初始化函数,即SysTick_Init;另外一个就是Delay_ms函数。

2、定时初始化函数


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK