Reputation: 21
I am using the LPC43xx series, which has cortex-m4/m0. This is a bare-metal system. I am new to bare metal programming and I want to make small benchmark programs for performance evaluation. This is a non-cache system. How can I do this ? or Should I try profiling.
Upvotes: 2
Views: 1084
Reputation: 9404
As I know there are three ways to measure code execution time in your case:
timers (init timer on frequency which you want, read timer value before and after code execution)
gpio (or similar thing) set it to 1 before and to 0 after your code execution, use oscillograph to measure time
performance counter embedded into CPU, in your case I think this one relevant: Cycle counter on ARM Cortex M4 (or M3)?
Upvotes: 1