FL-501 CSS for both clock domains (#264)

* CSS for both clock domains. Stale LSE detection and RTC domain reset on start.
* migrate to f4

Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
あく
2020-12-11 15:34:17 +03:00
committed by GitHub
parent df27d775bf
commit 46537f4470
15 changed files with 114 additions and 7 deletions

View File

@@ -1,7 +1,14 @@
#include <api-hal-power.h>
#include <main.h>
#include <bq27220.h>
#include <bq25896.h>
void HAL_RCC_CSSCallback(void) {
LL_RCC_ForceBackupDomainReset();
LL_RCC_ReleaseBackupDomainReset();
NVIC_SystemReset();
}
void api_hal_power_init() {
bq27220_init();
bq25896_init();