File tree Expand file tree Collapse file tree 5 files changed +50
-0
lines changed
targets/TARGET_STM/TARGET_STM32F7
TARGET_STM32F756xG/TARGET_NUCLEO_F756ZG
TARGET_STM32F767xI/TARGET_NUCLEO_F767ZI
TARGET_STM32F769xI/TARGET_DISCO_F769NI Expand file tree Collapse file tree 5 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150
150
__PWR_CLK_ENABLE ();
151
151
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152
152
153
+ // Select HSI as system clock source to allow modification of the PLL configuration
154
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
155
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
156
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
157
+
153
158
// Enable HSE oscillator and activate PLL with HSE as source
154
159
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155
160
if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208
213
// Enable power clock
209
214
__PWR_CLK_ENABLE ();
210
215
216
+ // Select HSI as system clock source to allow modification of the PLL configuration
217
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
218
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
219
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
220
+
211
221
// Enable HSI oscillator and activate PLL with HSI as source
212
222
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213
223
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150
150
__PWR_CLK_ENABLE ();
151
151
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152
152
153
+ // Select HSI as system clock source to allow modification of the PLL configuration
154
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
155
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
156
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
157
+
153
158
// Enable HSE oscillator and activate PLL with HSE as source
154
159
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155
160
if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208
213
// Enable power clock
209
214
__PWR_CLK_ENABLE ();
210
215
216
+ // Select HSI as system clock source to allow modification of the PLL configuration
217
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
218
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
219
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
220
+
211
221
// Enable HSI oscillator and activate PLL with HSI as source
212
222
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213
223
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150
150
__PWR_CLK_ENABLE ();
151
151
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152
152
153
+ // Select HSI as system clock source to allow modification of the PLL configuration
154
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
155
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
156
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
157
+
153
158
// Enable HSE oscillator and activate PLL with HSE as source
154
159
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155
160
if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208
213
// Enable power clock
209
214
__PWR_CLK_ENABLE ();
210
215
216
+ // Select HSI as system clock source to allow modification of the PLL configuration
217
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
218
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
219
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
220
+
211
221
// Enable HSI oscillator and activate PLL with HSI as source
212
222
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213
223
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150
150
__PWR_CLK_ENABLE ();
151
151
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152
152
153
+ // Select HSI as system clock source to allow modification of the PLL configuration
154
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
155
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
156
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
157
+
153
158
// Enable HSE oscillator and activate PLL with HSE as source
154
159
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155
160
if (bypass == 0 ) {
@@ -209,6 +214,11 @@ uint8_t SetSysClock_PLL_HSI(void)
209
214
// Enable power clock
210
215
__PWR_CLK_ENABLE ();
211
216
217
+ // Select HSI as system clock source to allow modification of the PLL configuration
218
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
219
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
220
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
221
+
212
222
// Enable HSI oscillator and activate PLL with HSI as source
213
223
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
214
224
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150
150
__PWR_CLK_ENABLE ();
151
151
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152
152
153
+ // Select HSI as system clock source to allow modification of the PLL configuration
154
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
155
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
156
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
157
+
153
158
// Enable HSE oscillator and activate PLL with HSE as source
154
159
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155
160
if (bypass == 0 ) {
@@ -212,6 +217,11 @@ uint8_t SetSysClock_PLL_HSI(void)
212
217
// Enable power clock
213
218
__PWR_CLK_ENABLE ();
214
219
220
+ // Select HSI as system clock source to allow modification of the PLL configuration
221
+ RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
222
+ RCC_ClkInitStruct .SYSCLKSource = RCC_SYSCLKSOURCE_HSI ;
223
+ HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_0 );
224
+
215
225
// Enable HSI oscillator and activate PLL with HSI as source
216
226
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
217
227
RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
You can’t perform that action at this time.
0 commit comments