Measuring clock cycles with MPC5744P

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

Measuring clock cycles with MPC5744P

588 Views
kshitij_dadheka
Contributor II

Hello,

I have a function and I need to measure the near exact number of processor cycles it takes to execute. I am able to measure the time in microseconds with a PIT timer on the MPC5744P, but I was not able to find a high-level function/utility in the SDK PA RTM 3.0.0 which can measure the processor cycles. More importantly, I would like to see how various compiler optimizations settings affect the processor cycles taken for executing. Any help would be really appreciated!  

Thanks,

Kshitij Dadhekar

0 Kudos
1 Reply

511 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Hmm, most accurate will be tracing via some debug tool.

From SW point it can be any timer.

Or a Pin toggle before and after executed code and measurement with scope.

There is no internal core timer like on z7 cores for this purposes.

regards,

Peter

0 Kudos