View Debug Time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

View Debug Time

676 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thangle0110 on Wed Oct 30 19:52:55 MST 2013
Hi all!
Now i'm using tool LPCXpresso v5.2.6_2137. And I want to know exactly the time how long the code runs between two debug break.
Can someone show me how to set the time view in LPCXpresso tool.
Thanks all
0 Kudos
Reply
2 Replies

663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Oct 31 01:32:36 MST 2013
Several MCUs (like M3) have a 'Data Watchpoint and Trace Unit'  :)

So you can read the clock cycles register(DWT->CYCCNT) in your program, divide it to something useful and print it.
That's very convenient.

Note: These registers are some of the forgotten registers in LPCXpresso-CMSIS3.0. In CMSIS 3.20 (LPCXpresso6) there are available.

So updating could be a good idea...

See also: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337i/BABJFFGJ.html
0 Kudos
Reply

663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Oct 30 19:58:00 MST 2013
The cycledelta register (in the register view) shows the number of cycles between breakpoints. The cycle register shows the total number of cycles. It is up to you to convert cycles into time (by multiplying by the clock frequency).
0 Kudos
Reply