View Debug Time

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

View Debug Time

709 次查看
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 项奖励
回复
2 回复数

696 次查看
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 项奖励
回复

696 次查看
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 项奖励
回复