How to ensure that a code in a Cortex-A is running at maximum CPU frequency

Asked

Viewed 42 times

0

When executing a C code I need to execute every 30ms a set of calculations that transforms an image and that is taking up to 100ms which forces me to discard 3 of every 4 frames that I get.

How can I guarantee that the CPU clock frequency is at maximum?

I’m using a Cortex-A53 that runs from 400Mhz to 1400Mhz.

Below is the result of the command cat /proc/cpuinfo

Processor       : ARMv7 Processor rev 3 (v7l)
processor       : 0
BogoMIPS        : 1594.36

processor       : 1
BogoMIPS        : 1594.36

processor       : 2
BogoMIPS        : 1594.36

processor       : 3
BogoMIPS        : 1594.36

processor       : 4
BogoMIPS        : 1601.53

processor       : 5
BogoMIPS        : 1594.36

processor       : 6
BogoMIPS        : 1594.36

processor       : 7
BogoMIPS        : 1594.36

I even tried to use the code suggested in this link to know how fast the processor, but I’m not able to compile it because I don’t think the correct includes:

https://superuser.com/questions/406141/how-to-get-an-arm-cpu-clock-speed-in-linux

What would be the correct code to get the current CPU clock frequency and how to adjust at runtime to use the maximum?

I’m using Linux, with C++ in GCC 4.9, in a Cortex-A53.

  • It may not seem like it but the question has to do with programming.

  • Hello @bigown, I need to make some adjustment?

  • As information I was able to manually make adjustments using the cpufreq-set tool changing the frequency maintenance strategy to "performance", but even so what I want is for my own code to be able to request maximum processor performance.

  • The question isn’t a ten, but I think we can answer it. The problem that they voted to close is that the person reads "processor" and thinks it’s hardware :) But it’s clear that it’s not.

  • Thanks for the comment, I will try to improve it. Any adjustment is welcome.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.