Hello,
Current Timer Value Register (PIT_CVAL0)
please refer to Reference Manual for KE02 http://cache.nxp.com/files/32bit/doc/ref_manual/MKE02Z64M20SF0RM.pdf?fpsp=1&WT_TYPE=Reference%20Manu...
I hope this helps you.
Best Regards,
Iva
这个我看了,你们的例程中找不到对Pit当前值的定义,所以我无法操作,我又不知道怎么修改
高厚清 2016 07 14
在 2016-07-13 18:11:45,"ivadorazinova" <admin@community.freescale.com> 写道:
|
|
NXP Community
|
|
KE02系列 PIT定时器当前值如何读取
reply from Iva Dorazinova in Kinetis Microcontrollers - View the full discussion
Hello,
please refer to Reference Manual for KE02 http://cache.nxp.com/files/32bit/doc/ref_manual/MKE02Z64M20SF0RM.pdf?fpsp=1&WT_TYPE=Reference%20Manu...
I hope this helps you.
Best Regards,
Iva
Reply to this message by replying to this email, or go to the message on NXP Community |
Start a new discussion in Kinetis Microcontrollers by email or at NXP Community |
Following KE02系列 PIT定时器当前值如何读取 in these streams: Inbox |
This email was sent by NXP Community because you are a registered user.
You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences
|
|
Hello,
it should be counter = PIT_CVAL0; for reading counter of channel 0
you cannot change the value of the counter.
You can change only load value LDVAL - either while the cycle is running (it will be set after finishing current period) or if you don´t want to finish it, you have to disable channel counter, set LDVAL and enable it again.
-----------
你好,
它應該是反= PIT_CVAL0;通道0的計數器讀數
你不能改變計數器的值。
您只能更改負載值LDVAL - 週期運行的是同時(將完成本期後才能進行設置),或者如果你不想將完成它,你必須禁用通道計數器,設置LDVAL並再次啟用它。
----------- translated by Google
I hope this helps.
Best Regards,
Iva
官方提供的库文件没有定义PIT_CVALn,我是菜鸟,自己在原来的定义中加了一下,编译通过了,但读出来的数据始终为0。
这是我pit.h中修改的一条
这是主函数中读取定时器当前值的部分,请教问题出在哪?有没有更新的库文件?我主要目的是测量交流点的周期,(最终目的是交流同步采样)。有更好的方法吗?
在 2016-07-19 21:40:11,"ivadorazinova" <admin@community.freescale.com> 写道:
|
|
NXP Community
|
|
KE02系列 PIT定时器当前值如何读取
reply from Iva Dorazinova in Kinetis Microcontrollers - View the full discussion
Hello,
it should be counter = PIT_CVAL0; for reading counter of channel 0
you cannot change the value of the counter.
You can change only load valueLDVAL - either while the cycle is running (it will be set after finishing current period) or if you don´t want to finish it, you have to disable channel counter, set LDVAL and enable it again.