Showing posts with label Microcontroller. Show all posts
Showing posts with label Microcontroller. Show all posts

Tuesday, December 9, 2014

Measure Real Time with TRACE32 (Lauterbach Debugger)

Measuring Real Time for a microcontroller using a Lauterbach Debugger and TRACE32 Software is very easy.
In the following image example, The execution time of the function UpdateCGI is measured:

  1. Put a breakpoint in the line of its call and another one at the line just after it.
  2. Open the RunTime tool from the Misc menu.
  3. Run the code, the debugger will stop at the first breakpoint.
  4. Then run again, so that it stops at the second breakpoint.
  5. Read the execution time from the RunTime window (laststart time).

Note:
This is assuming that, between the two breakpoints, no other code from another task is executed.
So, to guarantee the accuracy of your results,
it's preferred to either put the code you want to measure (code inside UpdateCGI in the above example) into a critical section or
grammatically stop the hardware timer at the start of that code and resume it again at the end of the code.