STMicroelectronics AN1216 Implementing a Periodic Alarm with TIMEKEEPER Application Note

This application note describes how to implement a periodic alarm using ST's TIMEKEEPER M48T59 and M48T59Y. The alarm can be set for a given time and day, or to repeat at a certain day in every month, or at a certain hour in every day, or at a certain minute of every hour, or at a certain second of every minute.


STMicroelectronics AN1216 Implementing a Periodic Alarm with TIMEKEEPER Application Note - cover page
Brand
STMicroelectronics
Category
Other Electronics
Document type
Application Note
Language
English
Pages
8
File format
PDF
File size
55 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
15CB3D56775D3991C4997B82503AC93B

About this manual

The document describes the implementation of periodic alarm functionality for the TIMEKEEPER M48T59 and M48T59Y real-time clock (RTC) devices. It details how to configure the hardware registers to set alarms that repeat at specific intervals, such as every second, minute, hour, or day.

The guide provides software configuration steps in C language for an embedded microcontroller unit (MCU). It covers setting the alarm parameters, managing interrupt flags to prevent system jams, and handling data conversion between Binary-Coded Decimal (BCD) format used by the device and integer formats used by the software.

What's inside

  • TIMEKEEPER Configuration
  • Alarm Registers
  • Software Configuration
  • Periodic Alarm Control
  • Data Format Conversion
  • Alarm Update Management

Frequently asked questions

What devices does this application note support?

The document is specifically tailored for the M48T59 (or M48T59Y) device, though ideas can be adapted to other TIMEKEEPER devices with the alarm feature.

How is the periodic alarm period defined?

The period is defined by setting specific Repeat bits (RPT4-RPT1) in the alarm registers and loading corresponding values into software variables for seconds, minutes, or hours.

What programming language is used for the example code?

The program has been written in ANSI C and was compiled and tested with an M68HC11 series MCU.

Download PDF (55 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →