ST AN1780 Application Note

This application note explains how to use the STR71x Real Time Clock (RTC) peripheral and demonstrates how to set up the RTC peripheral to keep track of time and date and generate alarm interrupts.


ST AN1780 Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
9
File format
PDF
File size
119 KB
Published
07 August, 2012
Updated
28 September, 2023
Model
STR71x
MD5 checksum
01EFB2F3549DCFBE7FB7607FF27DCC9D

About this manual

This document describes how to use the STR71x Real Time Clock (RTC) peripheral to maintain time and date, as well as to generate alarm interrupts. It details the configuration of the 32-bit binary counter and the prescaler to ensure the counter increments every second using a 32.768 kHz oscillator.

What's inside

  • Introduction
  • What is a Real Time Clock
  • Applications
  • STR71x RTC Peripheral
  • Configuration Mode
  • 32-bit Counter Time Conversion
  • C Library Functions
  • Code Description

Frequently asked questions

What is the purpose of this application note?

The document explains how to use the STR71x Real Time Clock (RTC) peripheral and demonstrates setting it up with a prescaler and interrupts.

What is the reference date used for the time conversion algorithm?

The application note uses January 1, 1970 as the reference date, which is often referred to as Unix Epoch.

When does the algorithm roll over due to the 32-bit counter?

The algorithm rolls over on Tuesday, January 19, 03:14:07, 2038.

What prescaler value is used to slow the RTC clock from 32.768 kHz to 1 Hz?

A prescaler value of 0x8000 (32768) is configured to achieve this frequency change.

Download PDF (119 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →