Measuring Code Execution Time on ARM Cortex‑M MCUs

In many real-time applications, the CPU can spend 95% (or more) of its time in less than 5% of the code. This is the case for motor control, engine control, wireless communications and many other time-sensitive applications.

These embedded systems are typically written in C, and often developers are forced to hand-optimize the code, possibly reverting to assembly language, to meet tight deadlines.

Measuring the actual execution time of portions of code can help you find the hot-spots in your code. This article will show how you can easily measure and display the execution time of code on live Cortex-M-based MCUs.

Read the full article at Embedded Computing Design.

Tags: , , , ,

Questions or Comments?

Have a question or a suggestion for a future article?
Don't hesitate to contact us and let us know!
All comments and ideas are welcome.