How to determine what is consuming cycles? (CYW943907AEVAL1F)

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

cross mob
ChMa_3922746
Level 5
Level 5
10 likes received 10 likes given 5 likes given

I am running my application, and under certain conditions where a quick barrage of TCP packets is received, something starts consuming CPU cycles in a very big way.  Because the main() loop slows down, I presume that a higher priority thread(s) is consuming the CPU time.

Other than using a debugger (which I don't have), are there any utilities that I could build in that might help determine where the CPU is spending all its cycles?  Thanks!

0 Likes
1 Solution
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hi ChMa_3922746

I found some literature on the internet talking about CPU utilization and some methods to figure out the CPU consumption.

How to calculate CPU utilization - Embedded.com

https://electronics.stackexchange.com/questions/439982/cpu-utilization-methods

Maybe the techniques mentioned here could be of help to you with the right modifications, might help to figure out what may be consuming the CPU in your use case.

Also, if you could share your code and let me know the steps to reproduce the issue; I could also try to look into it and figure out as to why the main() is slowing down.

Thanks

View solution in original post

2 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hi ChMa_3922746

I found some literature on the internet talking about CPU utilization and some methods to figure out the CPU consumption.

How to calculate CPU utilization - Embedded.com

https://electronics.stackexchange.com/questions/439982/cpu-utilization-methods

Maybe the techniques mentioned here could be of help to you with the right modifications, might help to figure out what may be consuming the CPU in your use case.

Also, if you could share your code and let me know the steps to reproduce the issue; I could also try to look into it and figure out as to why the main() is slowing down.

Thanks

Thank you so much for the links and offering to analyze my code.  I am digging a bit further on how this is happening in the first place.

0 Likes