954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

execution time for msp430

Hi,
I use an msp430f16 and I want to calculate the execution time of a code (in milliseconds)
any idea?
thanks

protestor
Newbie Poster
1 post since Dec 2011
Reputation Points: 10
Solved Threads: 0
 
Hi, I use an msp430f16 and I want to calculate the execution time of a code (in milliseconds) any idea? thanks

It looks like your chip has timers ; I don't know the MSP430 series myself, but I bet you could set up an interrupt to keep track of running time. It would be a slight overestimate because of the counting overhead, so it would be more useful for longer-running code.

gusano79
Posting Pro
519 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

If you are programming in C, then you can use the interval timer with the functions setitimer() and getitimer(). This is a standard function in Linux. Not sure about Windoze.

rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: