stm32: Add LSE driver strength config option.

This commit is contained in:
iabdalkader 2022-02-28 03:06:52 +02:00
parent 08d5700150
commit ad55071c5f
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)