---
title: "RTC"
date: 2025-01-27
draft: false
description: "external rtc"
tags: ["rtc", "eeprom"]
---
# RTC
The board can be connected to a external DS3231 RTC.

This allows the board to run fully of grid, without any kind of external connection after the initial setup.

*During initial setup, the time can be synchronized to the RTC via the configmode website.
* The used RTC module is supplied with 3.3v from the low power supply if the main battery is connected
* It can also supply the battery via a small lithium cell on the board for several years, in case main power is missing, e.G. during longer dark winter days when running of solar.

# Backup
* The RTC module also usually contains a small eeprom, that can be utilized to store a backup of the configuration. Either to simply be able to revert to a prior setup, or as an additional precaution.
* Backups will be stored with a crc16, so should be protected against random bitflips.
* The backup is stored agnostic to the platform, as in it just stores bytes and has no understand of it for usual backup recovery procedure. The logic is done in the webclient. This also allows to manually patch older version of the config file if required, eg. due to a failed migration with missing fields.

## Planned
* In case the main config file is damaged, the firmeware should attempt to use the backup file (without replacing the damaged file), and check if this allows a startup
* Backup Battery health estimation/ fail indicator
