在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 2342|回复: 1

[原创] 【K70例程】019低功耗定时器LPTMR_IAR

[复制链接]
发表于 2013-12-25 09:04:03 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
使用J-LinkV8
IAR版本6.6
调试串口波特率:115200
基于MDKK70-EK_T43硬件平台
关键词: Freescale 飞思卡尔 Kinetis Cortex-M4 K70 MDKK70 核心板 开发板 例程 demo 低功耗定时器 LPTMR

实验现象:
编译并下载调试程序,根据串口提示信息进行测试。

串口输出:
K70-256pin      Silicon rev 1.0
Flash parameter version 0.0.8.0
Flash version ID 1.0.18.0


****************************
LPTMR Examples
****************************



****************************
LPTMR Time Counting Example
LPTMR using LPO clock with no prescale, and compare value=5000 (5 seconds)
Press a key to start counter
Current value of counter register CNR is 5000
Waited for 5000 counts
End of Time Counting Example
****************************
Current value of pulse count register CNR is XXX.
Detected 1000 pulses on LPTMR_ALT2
End of Pulse Counting Example
****************************

****************************
LPTMR Time Counting Example with Prescaler
LPTMR using LPO clock with PRESCALE=4 and compare value=250 (8 seconds)
Press a key to start counter
Current value of counter register CNR is 250
Waited for 250 counts
End of Time Counting Example with Prescale
****************************


****************************
Internal Reference Clock Example
LPTMR using fast internal ref clock with PRESCALE=0x8, and compare value=15625 (4 seconds)
Press a key to start counter
Counting...

4 seconds should have passed
End of Internal reference Clock Source Example
****************************


****************************
LPO Clock Source Example
LPTMR using LPO clock with no prescale, and compare value=4000 (4 seconds)
Press a key to start counter
Counting...

4 seconds should have passed
End of LPO Clock Source Example
****************************

****************************
32 Khz Clock Source Example
Test using RTC OSC
LPTMR using 32Khz clock with PRESCALE=0x1, and compare value=32768 (4 seconds)
Press a key to start counter
Counting...

4 seconds should have passed
End of 32 Khz Clock Source Example
****************************

****************************
External Clock Source Example
LPTMR using external clock with PRESCALE=0xF, and compare value=7630 (10 seconds)
Press a key to start counter
Counting...

Timer should have waited for 10 seconds
End of External Clock Example
****************************

****************************
LPTMR Interrupt Example
LPTMR using LPO clock with no prescale, and compare value=5000 (5 seconds)
Press a key to start counter
Counting...

In LPT ISR!

Timer should have waited for 5 seconds
End of LPTMR Interrupt Example
****************************


****************************
LPTMR Pulse Counting Example on LPTMR_ALT1

Testing ALT1 pin on PORTA19
        PA19位于GPIO引出口,请给PA19脉冲

This test requires a function generator, or another way of producing a pulse signal on the pin specified above. Please connect that device to the specified pin
If you would like to continue with this example, press "y". To skip press any other key

Press any key to start pulse counter

Current value of pulse count register CNR is xxx.
Detected 1000 pulses on LPTMR_ALT1
End of Pulse Counting Example
****************************

****************************
LPTMR Pulse Counting Example on LPTMR_ALT2

Testing ALT2 pin on PORTC5
        PC5位于核心板20*2口第8脚引出口,请给PC5脉冲

This test requires a function generator, or another way of producing a pulse signal on the pin specified above. Please connect that device to the specified pin
If you would like to continue with this example, press "y". To skip press any other key

Press any key to start pulse counter

Current value of pulse count register CNR is xxx.
Detected 1000 pulses on LPTMR_ALT2
End of Pulse Counting Example
****************************

****************************
End of LPTMR Examples
****************************
 楼主| 发表于 2013-12-25 09:05:29 | 显示全部楼层
图片C5位于核心板20x2口.jpg
PC5位于核心板20x2口.jpg

019低功耗定时器LPTMR_IAR.rar (1.73 MB, 下载次数: 3 )
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-23 22:35 , Processed in 0.020896 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表