File tree 2 files changed +6
-6
lines changed
variants/STM32L4xx/L496R(E-G)T_L4A6RGT
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,11 @@ WEAK void SystemClock_Config(void)
69
69
* Initializes the RCC Oscillators according to the specified parameters
70
70
* in the RCC_OscInitTypeDef structure.
71
71
*/
72
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSE;
72
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
73
+ | RCC_OSCILLATORTYPE_HSE;
73
74
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
74
75
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
76
+ RCC_OscInitStruct.LSIState = RCC_LSI_ON;
75
77
RCC_OscInitStruct.PLL .PLLState = RCC_PLL_ON;
76
78
RCC_OscInitStruct.PLL .PLLSource = RCC_PLLSOURCE_HSE;
77
79
RCC_OscInitStruct.PLL .PLLM = 1 ;
@@ -95,9 +97,11 @@ WEAK void SystemClock_Config(void)
95
97
}
96
98
97
99
/* Initializes the peripherals clock */
98
- PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_SDMMC1;
100
+ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_SDMMC1
101
+ | RCC_PERIPHCLK_RTC;
99
102
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
100
103
PeriphClkInit.Sdmmc1ClockSelection = RCC_SDMMC1CLKSOURCE_HSI48;
104
+ PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
101
105
if (HAL_RCCEx_PeriphCLKConfig (&PeriphClkInit) != HAL_OK) {
102
106
Error_Handler ();
103
107
}
Original file line number Diff line number Diff line change 155
155
#define PIN_SERIAL_TX PC12
156
156
#endif
157
157
158
- // Extra HAL modules
159
- #if !defined(HAL_CRC_MODULE_ENABLED )
160
- #define HAL_CRC_MODULE_ENABLED
161
- #endif
162
158
// Value of the External oscillator in Hz
163
159
#define HSE_VALUE 8000000U
164
160
You can’t perform that action at this time.
0 commit comments