ARM Cortex based microcontrollers - like the one I'm using - all have something called a "SysTick timer". This is a timer specifically designed and dedicated for operating system usage. It runs on every cycle the microcontroller is running, counting down cycles. It can even create exceptions if the system designer needs them. This was the logical place to look into when figuring out how to profile the system performance.
It turned out that SysTick timer was designed to be super simple to use. Even better, it is identical on every ARM Cortex microcontroller out there! This includes even the memory address where its control registers are located. Superb!
I wrote a short example code snippet which demonstrates the basic usage of SysTick timer. The example is HERE.
No comments:
Post a Comment