简体   繁体   English

Arduino Due Sam3X8E访问计时器值

[英]Arduino Due Sam3X8E accessing timer value

Im using Arduino Due which has An Atmel core SAM3X8E i need to start the SAM3X8E timer and reading value directly form the timer any one has an example of how to start SAM3X8E timer and reading values directly form it here is the steps 我正在使用具有Atmel内核SAM3X8E的Arduino Due,我需要启动SAM3X8E计时器并直接从计时器中读取值,任何人都有一个如何启动SAM3X8E计时器并直接从中读取值的示例,这是步骤

1- setting the timer to count clock cycle (i also want the SAM3X8E to run on 84Mhz) 1-设置计时器以计数时钟周期(我也希望SAM3X8E在84Mhz上运行)

2- start timer 2-启动计时器

3- accessing timer reg and gets its value 3-访问计时器reg并获取其值

4- stop the timer form counting 4-停止计时器表格计数

plz if u have any example (preferred in C) 如果您有任何示例,请plz(在C中优先)

I recommend the following DueTimer library. 我建议使用以下DueTimer库。 It should fit your need. 它应该适合您的需求。 If not it should provide enough example in its source code for you to get what you want. 如果没有,它应该在其源代码中提供足够的示例,以使您获得所需的内容。

Along with the forum thread that details a lot about the SAM3X8E timers 连同详细讨论SAM3X8E计时器的论坛主题一起

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM