Time elapsed

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

Time elapsed

跳至解决方案
1,691 次查看
anshun
Contributor II

Hi,

I am using mcuexpresso for my project.

How to calculate the time elapsed in microseconds .

Is there any API to get the count or time?

0 项奖励
回复
1 解答
1,681 次查看
nickwallis
Senior Contributor I

You can use the DWT as a cycle counter, either to measure execution time or for delays.

https://mcuoneclipse.com/2017/01/30/cycle-counting-on-arm-cortex-m-with-dwt/

-Nick

 

在原帖中查看解决方案

1 回复
1,682 次查看
nickwallis
Senior Contributor I

You can use the DWT as a cycle counter, either to measure execution time or for delays.

https://mcuoneclipse.com/2017/01/30/cycle-counting-on-arm-cortex-m-with-dwt/

-Nick