10
10
*
11
11
*******************************************************************************
12
12
*/
13
- #if defined(ARDUINO_GENERIC_F723ICKX ) || defined(ARDUINO_GENERIC_F723ICTX ) || \
14
- defined(ARDUINO_GENERIC_F723IEKX ) || defined(ARDUINO_GENERIC_F723IETX ) || \
15
- defined(ARDUINO_GENERIC_F730I8KX ) || defined(ARDUINO_GENERIC_F733IEKX ) || \
13
+ #if defined(ARDUINO_GENERIC_F723ICKX ) || defined(ARDUINO_GENERIC_F723ICTX ) || \
14
+ defined(ARDUINO_GENERIC_F723IEKX ) || defined(ARDUINO_GENERIC_F723IETX ) || \
15
+ defined(ARDUINO_GENERIC_F730I8KX ) || defined(ARDUINO_GENERIC_F733IEKX ) || \
16
16
defined(ARDUINO_GENERIC_F733IETX )
17
17
#include "pins_arduino.h"
18
18
19
19
/**
20
- * @brief System Clock Configuration
21
- * @param None
22
- * @retval None
23
- */
20
+ * @brief System Clock Configuration
21
+ * @param None
22
+ * @retval None
23
+ */
24
24
WEAK void SystemClock_Config (void )
25
25
{
26
26
/* SystemClock_Config can be generated by STM32CubeMX */
27
- RCC_OscInitTypeDef RCC_OscInitStruct = {};
27
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
28
28
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
29
29
30
30
/** Configure the main internal regulator output voltage
31
- */
31
+ */
32
32
__HAL_RCC_PWR_CLK_ENABLE ();
33
33
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
34
34
35
35
/** Initializes the RCC Oscillators according to the specified parameters
36
- * in the RCC_OscInitTypeDef structure.
37
- */
36
+ * in the RCC_OscInitTypeDef structure.
37
+ */
38
38
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
39
39
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
40
40
RCC_OscInitStruct .HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT ;
@@ -44,29 +44,25 @@ WEAK void SystemClock_Config(void)
44
44
RCC_OscInitStruct .PLL .PLLN = 432 ;
45
45
RCC_OscInitStruct .PLL .PLLP = RCC_PLLP_DIV2 ;
46
46
RCC_OscInitStruct .PLL .PLLQ = 9 ;
47
- if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK )
48
- {
47
+ if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK ) {
49
48
Error_Handler ();
50
49
}
51
50
52
51
/** Activate the Over-Drive mode
53
- */
54
- if (HAL_PWREx_EnableOverDrive () != HAL_OK )
55
- {
52
+ */
53
+ if (HAL_PWREx_EnableOverDrive () != HAL_OK ) {
56
54
Error_Handler ();
57
55
}
58
56
59
57
/** Initializes the CPU, AHB and APB buses clocks
60
- */
61
- RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_HCLK |RCC_CLOCKTYPE_SYSCLK
62
- |RCC_CLOCKTYPE_PCLK1 |RCC_CLOCKTYPE_PCLK2 ;
58
+ */
59
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2 ;
63
60
RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK ;
64
61
RCC_ClkInitStruct .AHBCLKDivider = RCC_SYSCLK_DIV1 ;
65
62
RCC_ClkInitStruct .APB1CLKDivider = RCC_HCLK_DIV4 ;
66
63
RCC_ClkInitStruct .APB2CLKDivider = RCC_HCLK_DIV2 ;
67
64
68
- if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_7 ) != HAL_OK )
69
- {
65
+ if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_7 ) != HAL_OK ) {
70
66
Error_Handler ();
71
67
}
72
68
}
0 commit comments