STM32 porting FreeRTOS series sixteen: task running time statistics API function

I've been working on a balance car recently, and I've been working on it for a few days. . . . . . .

Link: https://pan.baidu.com/s/1j66nwHZFrX3tp1lH7YVuSQ?pwd=rtos 
Extraction code: rtos

Time statistics API function introduction

Void    vTaskGetRunTimeStats( char * pcWriteBuffer ) 

The function vTaskGetRunTimeStats() will fill the statistical information into a table, which provides the running time of each task and its percentage of the total time. To use this function, you need to set the macros configGENERATE_RUN_TIME_STAT and configUSE_STATS_FORMATTING_FUNCTIONS to 1

keepsake

describe

       pcWriteBuffer

             A buffer pointer that receives task runtime information

Parameters: pcWriteBuffer: The storage area for saving task time information. The storage area should be large enough to hold task time information.

char RunTimeInfo[400]; // 保存任务运行时间信息
vTaskGetRunTimeStats(RunTimeInfo); // 获取任务运行时间信息

By the way, post the relevant functions. If you want to use it, go directly to the official website. Write and write casually in this issue, and the queue in the next issue will be more important

Guess you like

Origin blog.csdn.net/qq_51519091/article/details/131754044