The secure RTC can lock and the clock is not updated.
To prevent this situation we reset LP registers (except for
timestamps and alarms) and clear the LVD flag. Then we
enable again LP SRTC.
* Fix of the issue that manifested after
running MuditaOS on Harmony via JLink,
which resulted in OS freezing when
trying to set time in normally booted
(via the bootloader) device.
* Minor RTC code cleanup.
* Partial T6 JLink script cleanup.
When setting datetime from timestamp (manually, not from network),
SRTC is set in order to retain the RTC datetime between resets.
RTC handling was refactored in order to get rid of unnecesary
conversions and third-party code mixed with proprietary code
within a single file.