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
+6 -2
View File
@@ -154,7 +154,7 @@ void SystemClock_Config(void)
/** Configure LSE Drive Capability
*/
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_MEDIUMLOW);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
@@ -220,7 +220,11 @@ void SystemClock_Config(void)
Error_Handler();
}
/* USER CODE BEGIN Smps */
if (!LL_RCC_LSE_IsReady()) {
LL_RCC_ForceBackupDomainReset();
LL_RCC_ReleaseBackupDomainReset();
NVIC_SystemReset();
}
/* USER CODE END Smps */
/** Enables the Clock Security System
*/