Hi Everyone,
i am using MSP430f5438a and i want to know, how can i measure the execution time of some instructions.
i hope, someone can give me any hint to do this.
Regards.
Mhd
You need to know what you are doing before you can get any meaningful result.
You could put together a sequence of instructions to generate a waveform with two "edges" on an oscilloscope. You then insert the instruction in question in that sequence. The increment of time between those two edges "before" and "after" you inserted the instruction is the execution time of that instruction.
You could also use one of the Timer/Counter on the chip instead of an oscilloscope in a similar way. In this case you are measuring the number of clock cycles to execute that instruction.
In both cases, you need to worry about pre-fetch (pipeline) and side effects of the instruction.
Hello,
I know two methods:
1.) calculate execution time by using CPU clock + instruction cycles + assembler instructions
This is a very time intensive method with a lot of computing and paperwork.
2.) same as old yellow cow recommended
If you have an oscilloscope you can do something like:
pin_toggle
instructions of interest
Regards
Marco
Probably you can also check number of cycles in debug mode.
Thank you for your replies. i will try one of these methodes.
Best Regrads,
Mohammad