Why when changing system clock frequency the number of cycles to execute a segment of code is different?

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

cross mob
SaPo_4323801
Level 1
Level 1
Welcome!

Counting the number of cycles when executing a segment of code, i get different numbers of cycles when i build for different system clocks. Why is that? Shouldn't be the same cycles or at least around the same even if i change the system clock frequency? I tested that with CY8C4146FNI-S433. I changed the system clock frequency from 24Mhz to 40Mhz and the cycles i get with 40Mhz are around 700 cycles less compared to when i build the project with a system clock of 24Mhz.

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Can you please attach the project and mention the piece of code that you are analyzing? We would like to analyze it and get back to you with our comments.

Also, can you please let us know how did you perform the test/measurement?

Thanks

Ganesh

0 Likes

Hi,

I am eager to know more about the problem you have mentioned. Can you please share more information about this?

Thanks

Ganesh

0 Likes