MCUXpresso SDK Documentation

rtc_func

rtc_func#

Overview#

The RTC demo application demonstrates the important features of the RTC Module by using the RTC Peripheral Driver.

The RTC demo supports the following features:

  • Calendar

    • Get the current date time with Year, Month, Day, Hour, Minute, and Second.

    • Set the current date time with Year, Month, Day, Hour, Minute, and Second.

  • Alarm

    • Set the alarm based on the current time.

    • Application prints a notification when the alarm expires.

  • Seconds interrupt

    • Use second interrupt function to display a digital time blink every second.

Supported Boards#

FRDM-K22F
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K22F board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-K32L2A4S
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L2A4S board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-K32L2B
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L2B board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-K32L3A6
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L3A6 board

  • Personal Computer

Board settings

No special settings are required. Note: Current chip on board can not support this demo.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-KE15Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE15Z board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed on the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2016-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:52
...
10:11:11
FRDM-KE16Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE16Z board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed on the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2016-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:52
...
10:11:11
FRDM-MCXC041
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXC041 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 9600 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-MCXC242
Hardware requirements
  • USB-C cable

  • FRDM-MCXC242 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-MCXC444
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXC444 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a type-c USB cable between the host PC and the MCU-Link USB port (J13) on the target board.

  2. Open a serial terminal with the following 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 demo.

Running the demo

The following menu is displayed in the serial terminal:

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-MCXW71
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW71 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect the micro and mini USB cable between the PC host and the USB ports on the board.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:
1) Get current date time.
2) Set current date time.
3) Alarm trigger show.
4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
MCX-W71-EVK
Hardware requirements
  • Type-C USB cable

  • MCX-W71-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:
1) Get current date time.
2) Set current date time.
3) Alarm trigger show.
4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
KW45B41Z-EVK
Hardware requirements
  • Mini/micro USB cable

  • KW45B41Z-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect the micro and mini USB cable between the PC host and the USB ports on the board.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:
1) Get current date time.
2) Set current date time.
3) Alarm trigger show.
4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
KW47-EVK
Hardware requirements
  • Type-C USB cable

  • KW47-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
MCX-W72-EVK
Hardware requirements
  • Type-C USB cable

  • MCX-W72-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time:

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
KW47-LOC
Hardware requirements
  • Type-C USB cable

  • KW47-LOC Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the LOC board J3.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:10
MCXW72-LOC
Hardware requirements
  • Type-C USB cable

  • MCXW72-LOC Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the LOC board J3.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:10
FRDM-MCXW72
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW72 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:10
FRDM-KW43
Hardware requirements
  • Type-C USB cable

  • FRDM-KW43 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J28.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11
FRDM-MCXW70
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW70 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J28.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

RTC Demo running...

Please choose the sub demo to run:

1) Get current date time.

2) Set current date time.

3) Alarm trigger show.

4) Second interrupt show (demo for 20s).

Select:
  1. Get current date time

This command gets the current date time in the format of YYYY-MM-DD HH:MM:SS.

Current datetime: 2015-11-11 11:11:11
  1. Set current date time

Sets the date time as YYYY-MM-DD HH:MM:SS.

Input date time like: "2010-10-10 10:10:10"
2009-10-10 10:10:10
  1. Show the alarm function

Sets the alarm time: 1~9 seconds from the time you input and waits for the alarm event arrival.

Input the alarm seconds from the current moment (1s~9s):3
Triggered Alarm: 10:10:31
  1. Seconds interrupt show

Shows the digital time animation by seconds-interrupt function.

10:10:51
10:10:51
...
10:11:11