mcuzone 发表于 2014-1-8 10:00:36

K70例程019:低功耗定时器LPTMR_IAR

使用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
****************************

mcuzone 发表于 2014-1-8 10:01:43

源码包:
页: [1]
查看完整版本: K70例程019:低功耗定时器LPTMR_IAR