CCNT Counter

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

cross mob
mehul
Level 1
Level 1
First reply posted First question asked Welcome!

Hello Sir

 
I need a technical support on Infineon controller 
which we are using in Audi project .
 
we are unable to find the value of CCNT Counter (which is always 0)
 
Controller name : TC334LP 
 CPU : CPU0_CCNT
 
Already the CPU0_CCTRL L 0x0000000002 enabled and configured .
 
Could you explain how i can get the value of the CCNT ?
 
I want to find execution time of the function .
So i have to use CCNT 
0 Likes
1 Solution
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

You can refer to the CPU_Perf_Counters_1_KIT_TC397_TFT example in the ADS. You need to use mfcr/mtcr for reading and writing the registers. If you still facing the issue, please share your code snippet.

Thanks.

View solution in original post

0 Likes
3 Replies
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

You can refer to the CPU_Perf_Counters_1_KIT_TC397_TFT example in the ADS. You need to use mfcr/mtcr for reading and writing the registers. If you still facing the issue, please share your code snippet.

Thanks.

0 Likes
mehul
Level 1
Level 1
First reply posted First question asked Welcome!

Hello 

 

Im using predefined code as present in IfxCpu.h  as Im using :

IfxCpu_resetAndStartCounters(IfxCpu_CounterMode_normal);

my_function();



after keeping continue Run to the SW ,and checking the value of in Debug window for
CPU0_CCNT SFR register ,which is always zero..



 

0 Likes
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

This is not expected. Could you also check the value returned by IfxCpu_stopCounters after execution of my_function?

Thanks.

Thanks.

0 Likes