How to get CPU clock speed in P2020?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get CPU clock speed in P2020?

603 Views
selvamt
Contributor I

Hi Team,

Is there any C function or API available to get the CPU clock speed?

As of now, i am using a command "cat /proc/cpuinfo" to get CPU clock speed.

I am looking for a API to get clock speed at run time in my application. Please suggest.

Thanks & Regards,

Selvam

Labels (1)
0 Kudos
1 Reply

395 Views
lunminliang
NXP Employee
NXP Employee

See technical support enginner comment below:

/proc/cpuinfo is a pseudo-file. A userland application can open it as a regular file for reading, read it in and parse to establish the current CPU clock rate.

0 Kudos