File tree 2 files changed +37
-0
lines changed
variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ WEAK void SystemClock_Config(void)
23
23
{
24
24
RCC_OscInitTypeDef RCC_OscInitStruct = {};
25
25
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
26
+ RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
26
27
27
28
/** Supply configuration update enable
28
29
*/
@@ -71,5 +72,22 @@ WEAK void SystemClock_Config(void)
71
72
if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_3 ) != HAL_OK ) {
72
73
Error_Handler ();
73
74
}
75
+
76
+ /** Initializes the peripherals clock
77
+ */
78
+ PeriphClkInitStruct .PeriphClockSelection = RCC_PERIPHCLK_SDMMC | RCC_PERIPHCLK_USB ;
79
+ PeriphClkInitStruct .PLL2 .PLL2M = 32 ;
80
+ PeriphClkInitStruct .PLL2 .PLL2N = 96 ;
81
+ PeriphClkInitStruct .PLL2 .PLL2P = 2 ;
82
+ PeriphClkInitStruct .PLL2 .PLL2Q = 2 ;
83
+ PeriphClkInitStruct .PLL2 .PLL2R = 4 ;
84
+ PeriphClkInitStruct .PLL2 .PLL2RGE = RCC_PLL2VCIRANGE_1 ;
85
+ PeriphClkInitStruct .PLL2 .PLL2VCOSEL = RCC_PLL2VCOWIDE ;
86
+ PeriphClkInitStruct .PLL2 .PLL2FRACN = 0.0 ;
87
+ PeriphClkInitStruct .SdmmcClockSelection = RCC_SDMMCCLKSOURCE_PLL2 ;
88
+ PeriphClkInitStruct .UsbClockSelection = RCC_USBCLKSOURCE_HSI48 ;
89
+ if (HAL_RCCEx_PeriphCLKConfig (& PeriphClkInitStruct ) != HAL_OK ) {
90
+ Error_Handler ();
91
+ }
74
92
}
75
93
#endif /* ARDUINO_GENERIC_* */
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ WEAK void SystemClock_Config(void)
183
183
{
184
184
RCC_OscInitTypeDef RCC_OscInitStruct = {};
185
185
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
186
+ RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
186
187
187
188
/* * Supply configuration update enable
188
189
*/
@@ -230,6 +231,24 @@ WEAK void SystemClock_Config(void)
230
231
if (HAL_RCC_ClockConfig (&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
231
232
Error_Handler ();
232
233
}
234
+
235
+ /* * Initializes the peripherals clock
236
+ */
237
+ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SDMMC | RCC_PERIPHCLK_USB;
238
+ PeriphClkInitStruct.PLL2 .PLL2M = 1 ;
239
+ PeriphClkInitStruct.PLL2 .PLL2N = 24 ;
240
+ PeriphClkInitStruct.PLL2 .PLL2P = 2 ;
241
+ PeriphClkInitStruct.PLL2 .PLL2Q = 2 ;
242
+ PeriphClkInitStruct.PLL2 .PLL2R = 4 ;
243
+ PeriphClkInitStruct.PLL2 .PLL2RGE = RCC_PLL2VCIRANGE_3;
244
+ PeriphClkInitStruct.PLL2 .PLL2VCOSEL = RCC_PLL2VCOWIDE;
245
+ PeriphClkInitStruct.PLL2 .PLL2FRACN = 0 ;
246
+ PeriphClkInitStruct.SdmmcClockSelection = RCC_SDMMCCLKSOURCE_PLL2;
247
+ PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
248
+ if (HAL_RCCEx_PeriphCLKConfig (&PeriphClkInitStruct) != HAL_OK) {
249
+ Error_Handler ();
250
+ }
251
+
233
252
}
234
253
235
254
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments