Merge pull request #1558 from openmv/lse_drive_strength

stm32: Add LSE driver strength config option.
This commit is contained in:
Ibrahim Abdelkader 2022-02-28 03:11:33 +02:00 committed by GitHub
commit b4bcc23bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -224,6 +224,13 @@ void SystemClock_Config(void)
}
#endif
#if defined(OMV_OSC_LSE_DRIVE)
// Configure LSE drive strength.
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_LSEDRIVE_CONFIG(OMV_OSC_LSE_DRIVE);
HAL_PWR_DisableBkUpAccess();
#endif
/* Macro to configure the PLL clock source */
__HAL_RCC_PLL_PLLSOURCE_CONFIG(OMV_OSC_PLL_CLKSOURCE);

View File

@ -141,6 +141,7 @@
// HSE/HSI/CSI State
#define OMV_OSC_LSE_STATE (RCC_LSE_ON)
#define OMV_OSC_LSE_DRIVE (RCC_LSEDRIVE_HIGH)
#define OMV_OSC_HSE_STATE (RCC_HSE_ON)
#define OMV_OSC_HSI48_STATE (RCC_HSI48_ON)