Real-Time Clock (RTC)¶
The Real-Time Clock (RTC) provides:
- Continuous timekeeping, even during system off and on states.
- Timestamp-based logging and event scheduling.
- Alarm functionality to wake the system from sleep (Work in Progress; Zephyr driver support expected from version 4.0).
Integration Details¶
- The RTC module requires configuration, initialization, and software functions to access the hardware.
- Integrated with Zephyr RTOS using Zephyr's device driver model and APIs for the STM32 RTC module.
Useful Links¶
Considerations¶
Warning
RTC should be available / running if Low-Speed-External Clock (LSE) is configured in Standby and Shutdown State of the STM32.
- Shutoff does not work
- Standby works -> current configuration
Warning
Precision of RTC Time is low.
- LSE clock should be precise as +- 10 ppm, but RTC time is off like 10000 ppm
Warning
RTC write has offset (e.g. read after write gives + 50 years, + 10 hours, or similar).
- Fixed integrated by storage of the offset after write into flash. Time read will apply the offset by software
Warning
Enabling RTC increases power usage.
- Measurement: 37 µA of whole BMS during standby state with RTC active (logged on 25/08/2025) -> in range for the BMS energy storage limit