MCDS Trace Viewer

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

cross mob
User15397
Level 1
Level 1
Hello,

I have measured the execution time of my program using:

1) Software cycle measurement followed by division of clock frequency --> #cycles / f_clk
2) Counting Ticks in the MCDS trace viewer (column "Ticks" or "TimeR") --> (#ticks*2) / f_clk (ticks*2 as 1 tick = 2 cpu clock cycles)
3) Direct time measurement in MCDS (column "TimeA" which shows the accumulated time in nanoseconds)

2) and 3) seem to be approximately the same, but 1) says that my program runs a lot faster.

Example: 1) measures 20,46059 ms - 2) measures 35,32313 ms and 3) measures 35,51473 ms

in the software cycle measurement, I read out the clock frequency of the CPU by a given function from Infineon which returns 100MHz in my case (after reset)
the MCDS Trace Viewer shows me the Message, that it uses 100,8MHz as frequency.
3255.attach

I have checked twice, if i programmed the same .hex file for the different measurements. The cylces in 1) are read out using the command
 __mfcr(CPU_CCNT);
with
#define CPU_CCNT 0xFC04
before and after the function call which i like to measure - like they do it in an example.
0 Likes
1 Reply
Not applicable
thanks, i see
0 Likes