FreeRTOS线程执行时间统计方法设计与应用

蒲泽坤, 沈勇, 陈旅超

集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (8) : 46-49.

PDF(928 KB)
PDF(928 KB)
集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (8) : 46-49.
技术纵横

FreeRTOS线程执行时间统计方法设计与应用

  • 蒲泽坤, 沈勇, 陈旅超
作者信息 +

Design and Application of FreeRTOS Thread Execution Time Statistics Method

  • Pu Zekun, Shen Yong, Chen Lvchao
Author information +
文章历史 +

摘要

为精确获得嵌入式实时操作系统线程执行时间信息,本文针对意法半导体STM32嵌入式开发平台,以STM32F407单片机为例,基于STM32CubeMX开发工具生成的FreeRTOS工程对线程执行时间统计测量功能进行完善与软件设计,并对FreeRTOS支持包中的时间状态API接口进行介绍与配置,提出使用单片机硬件定时器实现微秒级高精度线程执行时间测量器的设计。实验测试结果表明,该软件设计方法可移植性强,能够正确输出执行时间信息,适用于对线程执行时间要求较高的嵌入式项目以及STM32系列单片机嵌入式工程设计。

Abstract

In order to accurately obtain the thread execution time information of embedded real-time operating system,this paper aims at the STMicroelectronics STM32 embedded development platform,takes STM32F407 single-chip microcomputer as an examplebased on the FreeRTOS project generated by STM32CubeMX development tool to improve the thread execution time statistical measurement function and software design,and introduces and configures the time state API interface in the FreeRTOS support package,and proposes the design method of using single-chip microcomputer hardware timer to realize microsecond high-precision thread execution time measurement.The experiment results show that the software design method has high portability and can correctly output the execution time information.It can be used in embedded projects with high thread execution time requirements and STM32 series microcontroller embedded engineering design.

关键词

STM32F407 / FreeRTOS / 嵌入式系统 / 实时操作系统

Key words

STM32F407 / FreeRTOS / embedded system / real-time operating system

引用本文

导出引用
蒲泽坤, 沈勇, 陈旅超. FreeRTOS线程执行时间统计方法设计与应用[J]. 集成电路与嵌入式系统. 2023, 23(8): 46-49
Pu Zekun, Shen Yong, Chen Lvchao. Design and Application of FreeRTOS Thread Execution Time Statistics Method[J]. Integrated Circuits and Embedded Systems. 2023, 23(8): 46-49
中图分类号: TP316.2   

参考文献

[1] 闫保中,许兆新,丁继成,等.嵌入式控制系统开发及应用实例[M].哈尔滨:哈尔滨工业大学出版社,2012.
[2] 林衍照,王亚刚,丁大民.基于FreeRTOS的智能助行器设计[J].单片机与嵌入式系统应用,2022,22(9):54-57,62.
[3] 张龙彪,张果,王剑平,等.嵌入式操作系统FreeRTOS的原理与移植实现[J].信息技术,2012,36(11):31-34.
[4] 熊一鹏,岳伟.FreeRTOS多任务调度机制在监控单元中的应用[J].单片机与嵌入式系统应用,2021,21(9):64-66.

PDF(928 KB)

Accesses

Citation

Detail

段落导航
相关文章

/