Kinetis K70 CPU cycle counter

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

Kinetis K70 CPU cycle counter

665 Views
cport
Contributor I

Does anyone have any idea how to get a good CPU cycle count for code on the K70? The software analysis seems inconsistent and I have not figured out if the DSP Cycle Counter in the processor expert can be applied to the K70 board. Im trying to benchmark simple floating point math functions (multiply, divide, square root).

0 Kudos
1 Reply

375 Views
konrada
Contributor IV

You can use the SYSTICK counter, a 24-bit countdown in the Cortex-M core (unless your OS uses it to produce something like periodic timer interrupt). Or if you have a PIT to spare, use it as a 32-bit free-running countdown counter (clocked by bus clock).

0 Kudos