This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to benchmark code for TIVA C Cortex M4F

Other Parts Discussed in Thread: EK-TM4C123GXL

Hi all,

I've been writing some code that does floating-point signal processing on a Tiva C Launchpad (EK-TM4C123GXL). Now, I would like to optimize as much as possible my code to make it run faster. 

What is a simple way to benchmark my code, without placing breakpoints (which would disrupt normal microcontroller operations)?

I found out that Cortex M4 cores have a DWT_CYCCNT register that could be used to count the number of cycles a block of code takes:

  http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/BIIFBHIF.html

but are such functionalities implemented in TI Tiva C microcontrollers ? How can I access them?

I tried to use some sample code from:

  http://forums.arm.com/index.php?/topic/13949-cycle-count-in-cortex-m3/

without success.

Is there some TI header which gives me access to such register?

Are there different, smarter (but still easy) ways to do benchmarking?

Thanks for any hint,

FM