English
Language : 

AN1780 Datasheet, PDF (1/9 Pages) STMicroelectronics – STR71X REAL TIME CLOCK APPLICATION EXAMPLE
AN1780
APPLICATION NOTE
STR71X REAL TIME CLOCK APPLICATION EXAMPLE
INTRODUCTION
The purpose of this application note is to explain how to use the STR71x Real Time Clock
(RTC) peripheral. As an application example, it demonstrates how to setup the RTC periph-
eral, in terms of prescaler and interrupts, to be used to keep the time and date and to generate
Alarm interrupts.The STR71x RTC has a 32-bit binary counter register. The 32-bit binary
counters are designed to continuously count time in seconds. This application note addresses
how to convert the 32-bit time value into a date and time value that can be put in the following-
form MM/DD/YYYY, HH:MM:SS.
The date used in this application note is the same used with the UNIX operating system, the
reference date January 1, 1970, often referred to as Unix Epoch.
This document in organized in two sections, the first presents the STR71x RTC peripheral and
how to configure it and generate a fixed time base, the second part describes the related soft-
ware required for the application.
This application note deals with various techniques for keeping time with the STR71x.
For more information about the STR71x RTC peripheral refer to STR71x Reference Manual.
Note: Because of the reference date used and the use of a 32-bit counter, this algorithm rolls
over on Tuesday, January 19, 03:14:07, 2038.
The following application note developed using RVDK Toolchain V1.6.1 and the STR710 Eval-
board.
You must have the ARM Real View Developer Kit to get the most out of this Application Note.
AN1780/1204
1/9
1