Reputation: 11
I am working with LPC55s69 development board and i want to calculate the amount of time it requires to run a simple "Hello World" program. How can I do it? I am a beginner at this and this is also my first time working with the development board.
Upvotes: -3
Views: 48
Reputation: 12673
The most simple solution uses a single port pin and an oscilloscope to measure. Add code to initialize this pin as output and set it where your program begins, and reset it where your program ends.
Then use the oscilloscope to measure the interval. You will notice that there is an additional time after the end of the reset signal and the start of your program.
Please note that you should not return from main()
in an embedded system. Where should it return to? If your environment (the C++ runtime provided) is done well, it will run into an endless loop when main()
returns. But don't do this unless it is explicitly documented. Commonly you insert an endless loop yourself.
Upvotes: 2