cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS Debug windows not displaying proper data

HPate.10
Associate III

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 Advance0693W00000QNAPuQAP.png Image: STM32Cube IDE

0693W00000QNAMgQAP.png

11 REPLIES 11
KnarfB
Principal III

Did you follow the FreeRTOS chapter in UM2609 "STM32CubeIDE user guide"?

hth

KnarfB

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

 0693W00000QNZQYQA5.png 

@HPate.10​ did you fix it?

we dont need to firmware by ourselves, lets talk
Semer CHERNI
ST Employee

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.

@Semer CHERNI​ thanks for your reply, as i read in the user guide:

  • First, USE_TRACE_FACILITY should be defined to 1.

0693W00000QNoGsQAL.pngI already configured this parameter in cubeMX0693W00000QNoHMQA1.pngI double checked and indeed is correctley defined in my file.

0693W00000QNoHqQAL.png 

 So my issue wasnt that one

we dont need to firmware by ourselves, lets talk

we dont need to firmware by ourselves, lets talk

@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"?

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 */

we dont need to firmware by ourselves, lets talk

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 */

 0693W00000QNsQcQAL.png0693W00000QNsRLQA1.png

we dont need to firmware by ourselves, lets talk