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.
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.
| Clock source for AWU and beeper | 128 kHz LS clock |
|---|---|
| HSE power consumption increase | about 0.5 mA |
| LSI power consumption | about 5 yA |
| LSI temperature dependence | +12.5% |
The document focuses on solutions using the auto-wakeup unit or beeper.
No, only simple solutions without additional hardware are described.