How to Use RTC in Traveo II Family
About this document
Scope and purpose
This application note describes how to use the real-time clock (RTC) in Traveo II family MCUs.
Intended audience
This document is intended for anyone who uses the RTC of the Traveo II family.
Table of contents
About this document ....................................................................................................................... 1
Table of contents ............................................................................................................................ 1
1 Introduction .......................................................................................................................... 2
1.1 Features of RTC ....................................................................................................................................... 2
2 Operation Overview ............................................................................................................... 3
2.1 Basic RTC Settings ................................................................................................................................... 4
2.1.1 Use Case ............................................................................................................................................. 4
2.1.2 Initializing the RTC Function .............................................................................................................. 4
2.1.3 Configuring the RTC Function ............................................................................................................ 6
2.1.4 Example Program to Configure RTC Function in Driver Part .......................................................... 10
2.2 Reading TIME and DATE ........................................................................................................................ 16
2.2.1 Use Case ........................................................................................................................................... 16
2.2.2 Reading the RTC Values ................................................................................................................... 17
2.2.3 Items Read for RTC Value ................................................................................................................. 18
2.3 Updating TIME and DATE ...................................................................................................................... 20
2.3.1 Use Case ........................................................................................................................................... 20
2.3.2 Updating the RTC Values (For Example, Adjusting DST) ................................................................ 21
2.3.3 Example Program to Update RTC Values in Driver Part.................................................................. 23
2.4 Calibrating WCO .................................................................................................................................... 24
2.4.1 Use Case ........................................................................................................................................... 24
2.4.2 Capturing the WCO Waveform ......................................................................................................... 24
2.4.3 Example Program to Capture WCO Waveform in Driver Part ......................................................... 29
2.5 Measuring the Difference Between the WCO and an Ideal Waveform................................................. 30
2.5.1 Example Program to Measuring the WCO Waveform in Driver Part ............................................... 34
2.5.2 Confirming the Accuracy of the WCO Frequency after Calibration ................................................ 36
2.5.3 Example Program to Confirm Accuracy of WCO Frequency after Calibration in Driver Part ........ 40
Glossary ....................................................................................................................................... 42
Related Documents ........................................................................................................................ 44
Revision history............................................................................................................................. 46