rtc_freerun#
Overview#
The RTC project is a demonstration program of the SDK RTC driver. It sets RTC work on free run mode. It enables both alarm0 and alarm1. Alarm0 works in repeated mode, alarm occurs every 2 seconds. Alarm1 works in single shot mode, alarm occurs in 5th second. Message ahout which alarm occurs will be logged out.
Supported Boards#
FRDM-MCXL255
Hardware requirements
Type-C USB cable
FRDM-MCXL255 board
Personal Computer
Board settings
Make sure you have solder bridges SJ1 and SJ2 set to
2-1 for the main core (cm33)
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 Free Running Mode Example
RTC initialized in Free Running Mode with initial counter value: 0. Tamper 0 is enabled, press the button to trigger it. Alarm 0 clock will ring every 2 seconds. Alarm 1 clock will ring in the 5th second.
*** ALARM 0 occured! ***
*** ALARM 0 occured! ***
*** ALARM 1 occured! ***
*** ALARM 0 occured! ***
*** ALARM 0 occured! ***
*** ALARM 0 occured! ***
*** ALARM 0 occured! ***