Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AC2
Level 2
Level 2
10 questions asked 5 replies posted 10 sign-ins

Hello Guys,

1. I am using Aurix TC399 and I would like to measure the CPU Load in percentage for a "custom function" running.

2. Also, I want to measure 'MIPS'.

Could you please help me with  the above 2 queries? 

 

I tried to measure MIPS as following:
Formula: MIPS = Instruction Count / (Execution Time * 10^6)
And, I found the value to be 190 MIPS. I am not sure if this is the right way to find it. 

Looking forward to your support.
Thanks in advance.

0 Likes
1 Solution
Anupama_A
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 250 sign-ins

Hi @AC2 ,

 

1. Make use of STM timer or CPU Performance counters to calculate the time taken for the execution of  a particular function.

2. DMIPS is more of performance capability of CPU, CPU load can not be determined in terms of DMIPS. 

3. For a given time period, we can measurement the cumulative time taken by the function of interest. This will give us the load percentage for that function.

In RTOS, we can try to measure the time taken for all the configured tasks and the idle task.  This will give us the overall CPU load percentage.

For RTOS, please refer to this thread

 

Best Regards,

Anupama.

View solution in original post

0 Likes
8 Replies
Anupama_A
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 250 sign-ins

Hi @AC2 ,

 

1. You could make use of STM timer or Performance counters to calculate the time taken for the execution of  a particular function.

2. Could you give me some more background on what is the use case since we see similar threads created by you?

 

Best regards, 

Anupama. 

0 Likes
AC2
Level 2
Level 2
10 questions asked 5 replies posted 10 sign-ins

Hi @Anupama_A,

Thanks for your repsonse. 

1. Yes, in the above mentioned solution, I was just able to measure function runtime. Now, I would like to measure the CPU Load taken to execute the same function in percentage.

2. I need to measure CPU Load when my software is running on the TC399 controller either in terms of Percentage or DMIPS.  I need some support on how it can be performed? 

Thanks in advance. 

 

0 Likes
Anupama_A
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 250 sign-ins

Hi @AC2 ,

 

DMIPS is more of performance capability of CPU, CPU load can not be determined in terms of DMIPS. Regarding DMIPS, you can continue the discussion in this thread

 

Best regards, 
Anupama. 

 

Best regards, 

Anupama. 

0 Likes
AC2
Level 2
Level 2
10 questions asked 5 replies posted 10 sign-ins

Hello,

Do you have any answer to calculate CPU Load in terms of percentage on TC399? 

Alternatively, can it be done by flashing an RTOS and then measuring it? 

Regards,

Ak

0 Likes
Nambi
Moderator
Moderator
Moderator
5 likes given 100 solutions authored 250 replies posted

Hi,

For a given time period, You can measurement the cumulative time taken by the function of interest. This will give you the load percentage for that function.

In your RTOS, you can try to measure the time taken for all the configured tasks and the idle task.  This will give you the overall CPU load percentage.

Best Regards.

0 Likes
AC2
Level 2
Level 2
10 questions asked 5 replies posted 10 sign-ins

@Nambi 

Thanks for your response. 

I would like to know if there is any documentation to integrate RTOS into TC399? 

When I did some background research, I could not find any documentation.

Highly appreciated if I get some support here.

 

Thanks in advance.

0 Likes
Nambi
Moderator
Moderator
Moderator
5 likes given 100 solutions authored 250 replies posted

Hi,

You can refer to the following thread.

https://community.infineon.com/t5/AURIX/FreeRTOS-for-TC399/td-p/622105

Best Regards.

0 Likes
Anupama_A
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 250 sign-ins

Hi @AC2 ,

 

1. Make use of STM timer or CPU Performance counters to calculate the time taken for the execution of  a particular function.

2. DMIPS is more of performance capability of CPU, CPU load can not be determined in terms of DMIPS. 

3. For a given time period, we can measurement the cumulative time taken by the function of interest. This will give us the load percentage for that function.

In RTOS, we can try to measure the time taken for all the configured tasks and the idle task.  This will give us the overall CPU load percentage.

For RTOS, please refer to this thread

 

Best Regards,

Anupama.

0 Likes