【K70例程】019低功耗定时器LPTMR_IAR

By Mcuzone

使用J-LinkV8
IAR版本6.6
调试串口波特率:115200
基于MDKK70-EK_T43硬件平台

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

串口输出:
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
****************************

PC5位于核心板20x2口: 

例程及示例:

链接: http://pan.baidu.com/s/1mgocyJQ 密码: skx7
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值