Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
RTC Example

Overview

The RTC Example project is a demonstration program that uses the KSDK software to get/set RTC Time & Alarm time. RTC module is configured to use as an alarm clock.

Supported Platforms

These Freescale Freedom development platforms and Tower System modules are supported by the RTC example.

System Requirement

Hardware requirements

Toolchain requirements

Software requirements

Getting Started

Hardware settings

The RTC Example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board's jumper settings and configurations in default state when running this example.

Prepare the example

  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.
  2. Open a serial terminal with these settings:
    • 115200 baud rate
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
  3. Download the program to the target board.
  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Run the example

These instructions are displayed/shown on the terminal window:

RTC example: set up time to wake up an alarm
Current datetime: 2014-12-25 19:00:00
Please input the number of second to wait for alarm
The second must be positive value

User need type characters from the keyboard and the board will receive and initialize a second value to occur alarm mode. Then, until specific second, alarm will be occurred. Note: On the FRDM-KL26Z and FRDM-KL46Z, the RTC counter is fed without the 32Khz (OSC32KCLK) clock. Therefore the accuracy of RTC alarms will be impacted. These instructions are displayed/shown on the terminal window:

Alarm will be occurred at: 2014-12-25 19:00:21
Alarm occurred !!!! Current datetime: 2014-12-25 19:00:22
Please input the number of second to wait for alarm
The second must be positive value

After specific RTC date time matches alarm date time, an indicated LED should be turned on.