mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 23:43:23 +00:00
Merge pull request #391 from kasjer/kasjer/stm32l476disco-clock-configuration
stm32l476disco clock configuration
This commit is contained in:
commit
286ff03ffa
@ -86,14 +86,19 @@ static void SystemClock_Config(void)
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
|
||||
|
||||
/* Enable the LSE Oscilator */
|
||||
/* Enable the LSE Oscillator */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
/* Enable the CSS interrupt in case LSE signal is corrupted or not present */
|
||||
HAL_RCCEx_DisableLSECSS();
|
||||
|
||||
/* Set tick interrupt priority, default HAL value is intentionally invalid
|
||||
and that prevents PLL initialization in HAL_RCC_OscConfig() */
|
||||
HAL_InitTick((1UL << __NVIC_PRIO_BITS) - 1UL);
|
||||
|
||||
/* Enable MSI Oscillator and activate PLL with MSI as source */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI;
|
||||
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
|
||||
|
Loading…
x
Reference in New Issue
Block a user