STMicroelectronics AN2780 Real-time keeping on STM8S and STM8A devices using AWU and beeper Application Note

The purpose of this application note is to explain how to keep real-time information on a STM8S or STM8A device maintained in low power mode. Only simple solutions which do not require any additional hardware are described in this application note. They are suitable for applications which do not need a very accurate real- time measurement. To benefit fully from the information in this application note, the user should be familiar with the STM8S and STM8A microcontroller architecture and with the basics of C language. For further information on the STM8S and STM8A family features, pinout and electrical characteristics, please refer to the STM8S and STM8A datasheets. An STM8S and STM8A firmware package is delivered with this application note. It contains the complete C source code of an example described in this application note, so that the user can compile, link or modify it as necessary. This document and its associated firmware package, are written to accompany the STM8S and STM8A firmware library. It includes many examples describing how to use the STM8S and STM8A timers, the clock system, the beeper and the auto-wakeup unit mentioned in this application note.


STMicroelectronics AN2780 Real-time keeping on STM8S and STM8A devices using AWU and beeper Application Note - cover page
Brand
STMicroelectronics
Document type
Application Note
Language
English
Pages
20
File format
PDF
File size
387 KB
Published
07 August, 2012
Updated
28 September, 2023
Models
STM8S, STM8A
MD5 checksum
3BF3D90297F121239DAF90BE5ECE6DC7

About this manual

This document describes methods to keep real-time data on STMicroelectronics STM8S and STM8A devices while they are in low power modes. It focuses on solutions that utilize existing peripherals, specifically the auto-wakeup unit (AWU) and the beeper, without requiring additional hardware components.

The note details two primary approaches: using the AWU in Active-halt mode to track elapsed time intervals, and utilizing the beeper for similar purposes. It analyzes the accuracy trade-offs between using a High-Speed External (HSE) clock versus a Low-Speed Internal (LSI) oscillator and provides software implementation strategies for handling interrupt service routines to ensure accurate timekeeping.

What's inside

  • Real-time measurement capability
  • Time base common to auto-wakeup unit and beeper
  • Solution using the auto-wakeup unit in Active-halt mode
  • Solution using the beeper
  • Associated software example description
  • Firmware environment
  • Test environment
  • Accuracy of the used method

Specifications

Clock source for AWU and beeper128 kHz LS clock
HSE power consumption increaseabout 0.5 mA
LSI power consumptionabout 5 yA
LSI temperature dependence+12.5%

Frequently asked questions

What peripherals are used for real-time keeping in this note?

The document focuses on solutions using the auto-wakeup unit or beeper.

Does this solution require additional hardware?

No, only simple solutions without additional hardware are described.

Download PDF (387 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →