Skip to content

Commit cc925bd

Browse files
committed
fix NUCLEO_H563ZI clock source and all OscillatorType formatting.
1 parent 6bf3069 commit cc925bd

File tree

11 files changed

+46
-48
lines changed

11 files changed

+46
-48
lines changed

variants/STM32H5xx/H503CB(T-U)/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ WEAK void SystemClock_Config(void)
3333
/** Initializes the RCC Oscillators according to the specified parameters
3434
* in the RCC_OscInitTypeDef structure.
3535
*/
36-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
37-
| RCC_OSCILLATORTYPE_CSI;
38-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
39-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
36+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
37+
| RCC_OSCILLATORTYPE_LSI;
4038
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4139
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
40+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
41+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4242
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4343
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4444
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H503KBU/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ WEAK void SystemClock_Config(void)
3333
/** Initializes the RCC Oscillators according to the specified parameters
3434
* in the RCC_OscInitTypeDef structure.
3535
*/
36-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
37-
| RCC_OSCILLATORTYPE_CSI;
38-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
39-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
36+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
37+
| RCC_OSCILLATORTYPE_LSI;
4038
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4139
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
40+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
41+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4242
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4343
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4444
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H503RBT/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ WEAK void SystemClock_Config(void)
3333
/** Initializes the RCC Oscillators according to the specified parameters
3434
* in the RCC_OscInitTypeDef structure.
3535
*/
36-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
37-
| RCC_OSCILLATORTYPE_CSI;
38-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
39-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
36+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
37+
| RCC_OSCILLATORTYPE_LSI;
4038
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4139
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
40+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
41+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4242
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4343
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4444
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H503RBT/variant_NUCLEO_H503RB.cpp

+4-10
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,15 @@ WEAK void SystemClock_Config(void)
115115

116116
while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
117117

118-
/** Configure LSE Drive Capability
119-
* Warning : Only applied when the LSE is disabled.
120-
*/
121-
HAL_PWR_EnableBkUpAccess();
122-
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
123-
124118
/** Initializes the RCC Oscillators according to the specified parameters
125119
* in the RCC_OscInitTypeDef structure.
126120
*/
127-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSE
128-
| RCC_OSCILLATORTYPE_CSI;
129-
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
130-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
121+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
122+
| RCC_OSCILLATORTYPE_LSI;
131123
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
132124
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
125+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
126+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
133127
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
134128
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
135129
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H562R(G-I)T/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ WEAK void SystemClock_Config(void)
3333
/** Initializes the RCC Oscillators according to the specified parameters
3434
* in the RCC_OscInitTypeDef structure.
3535
*/
36-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
37-
| RCC_OSCILLATORTYPE_CSI;
38-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
39-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
36+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
37+
| RCC_OSCILLATORTYPE_LSI;
4038
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4139
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
40+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
41+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4242
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4343
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4444
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H562R(G-I)T/variant_WEACT_H562RG.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ WEAK void SystemClock_Config(void)
112112
/** Initializes the RCC Oscillators according to the specified parameters
113113
* in the RCC_OscInitTypeDef structure.
114114
*/
115-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
116-
| RCC_OSCILLATORTYPE_CSI;
117-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
118-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
115+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
116+
| RCC_OSCILLATORTYPE_LSI;
119117
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
120118
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
119+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
120+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
121121
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
122122
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
123123
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H563IIKxQ_H573IIKxQ/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ WEAK void SystemClock_Config(void)
3333
/** Initializes the RCC Oscillators according to the specified parameters
3434
* in the RCC_OscInitTypeDef structure.
3535
*/
36-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
37-
| RCC_OSCILLATORTYPE_CSI;
38-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
39-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
36+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
37+
| RCC_OSCILLATORTYPE_LSI;
4038
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4139
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
40+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
41+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4242
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4343
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4444
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H563IIKxQ_H573IIKxQ/variant_STM32H573I_DK.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ WEAK void SystemClock_Config(void)
208208
/** Initializes the RCC Oscillators according to the specified parameters
209209
* in the RCC_OscInitTypeDef structure.
210210
*/
211-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSI
212-
| RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_CSI;
211+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
212+
| RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI;
213+
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
214+
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
215+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
213216
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS_DIGITAL;
214217
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
215218
RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
216219
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
217-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
218-
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
219-
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
220220
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
221221
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_HSE;
222222
RCC_OscInitStruct.PLL.PLLM = 5;

variants/STM32H5xx/H563R(G-I)T_H573RIT/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ WEAK void SystemClock_Config(void)
3434
/** Initializes the RCC Oscillators according to the specified parameters
3535
* in the RCC_OscInitTypeDef structure.
3636
*/
37-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
38-
| RCC_OSCILLATORTYPE_CSI;
39-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
40-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
37+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
38+
| RCC_OSCILLATORTYPE_LSI;
4139
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4240
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
41+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
42+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4343
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4444
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4545
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ WEAK void SystemClock_Config(void)
3434
/** Initializes the RCC Oscillators according to the specified parameters
3535
* in the RCC_OscInitTypeDef structure.
3636
*/
37-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_LSI
38-
| RCC_OSCILLATORTYPE_CSI;
39-
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
40-
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
37+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
38+
| RCC_OSCILLATORTYPE_LSI;
4139
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
4240
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
41+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
42+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
4343
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
4444
RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_CSI;
4545
RCC_OscInitStruct.PLL.PLLM = 1;

variants/STM32H5xx/H563Z(G-I)T_H573ZIT/variant_NUCLEO_H563ZI.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ WEAK void SystemClock_Config(void)
188188
/** Initializes the RCC Oscillators according to the specified parameters
189189
* in the RCC_OscInitTypeDef structure.
190190
*/
191-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_LSE;
191+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_CSI | RCC_OSCILLATORTYPE_HSI48
192+
| RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_LSE;
193+
RCC_OscInitStruct.CSIState = RCC_CSI_ON;
194+
RCC_OscInitStruct.CSICalibrationValue = RCC_CSICALIBRATION_DEFAULT;
195+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
192196
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
193197
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
194198
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

0 commit comments

Comments
 (0)