2022-08-07 11:36 PM
I have followed the FreeRTOS API document below I have mentioned the details about the documents.
FreeRTOS on STM32 CMSIS_OS API
T.O.M.A.S – Technically-Oriented Microcontroller Application Services
Version: v1.7
Link for document: https://raw.githubusercontent.com/eziya/STM32F4_HAL_FREERTOS_LAB/master/FreeRTOS_v1.7%20-%20CMSIS%20OS%20API.pdf
Currently, In my application two tasks running simultaneously.
For specific task CPU usage I have followed the page No.251 steps in my STM32Cube IDE for finding the particular task CPU usage.
But, FreeRTOS Task List windows not updating the "Run Time" column value and it's showing the "N/A"
Could you tell me what is issue with IDE or if anything the FreeRTOS configuration side missing? or any version issue?
For more clarification, I have attached the screenshots from the document as well as from STM32Cube IDE.
My Hardware and Software details:
Hardware :
- STM32H745 Discovery board.
Software :
- STM32Cube IDE
- Version : 1.8.0
- Application side currently I am running two tasks.
Thanks In Advance Image: STM32Cube IDE
2022-08-08 06:10 AM
Did you follow the FreeRTOS chapter in UM2609 "STM32CubeIDE user guide"?
hth
KnarfB
2022-08-12 02:50 AM
I have the same problem with an stm32f105RBt6 and i believe i followed the user guide
cubeMX 6.6.1
STM32Cube FW_F1 V1.8.4
cubeIDE 1.8.0
FReeRTOS v2 10.0.1
CMSIS-RTOS 2.00
@HPate.10 did you fix it?
2022-08-16 06:34 AM
Hello @HPate.10
To be able to populate the FreeRTOS™-related views with detailed information about the RTOS status, some files in the FreeRTOS™ kernel must be configured.
Check the 6.2.1 paragraph from STM32CubeIDE user guide - User manual doc to find the description of what should be added.
Kind regards,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-08-16 07:12 AM
@Semer CHERNI thanks for your reply, as i read in the user guide:
I already configured this parameter in cubeMXI double checked and indeed is correctley defined in my file.
So my issue wasnt that one
2022-08-16 07:13 AM
.
2022-08-16 10:35 AM
@KnarfB, @Javier Muñoz
Thank you for your guidance.
I am able to get "RUN TIME(%)".
But still, I have one query as I attached the below image where you can see "CTR OVR" in the first row of the RUN TIME column.
So could you help me to figure out, what is the meaning of "CTR OVR"?
2022-08-16 10:37 AM
2022-08-17 12:55 AM
I am still trying to get RUN TIME(%), did you do something special?
i started looking into FreeRTOS's own user guide about Run Time Stats.
I cannot see where cubeMX generated the 10xfasterthansystick counter.... the functions seem to be empty, i believe we should use a dedicated timer for this and it wasnt obvious for me.
/* USER CODE BEGIN 1 */
/* Functions needed when configGENERATE_RUN_TIME_STATS is on */
__weak void configureTimerForRunTimeStats(void)
{
}
__weak unsigned long getRunTimeCounterValue(void)
{
return 0;
}
/* USER CODE END 1 */
2022-08-17 01:39 AM
I finally got it, i set the TIM6 (no interruption) as 10x faster than freertos systick, then i use its CNT register as counter for getRunTimeCounterValue.
As the timer has a 16bit register i could only debug the first 6,5seconds.
After 6,5 seconds i get "CTR OVR" (@HPate.10 counter overaload?) meaning i need a bigger storage for the run time counter variable
/* USER CODE BEGIN 1 */
/* Functions needed when configGENERATE_RUN_TIME_STATS is on */
__weak void configureTimerForRunTimeStats(void)
{
TIM6->CNT=0;
}
__weak unsigned long getRunTimeCounterValue(void)
{
return TIM6->CNT;
}
/* USER CODE END 1 */