File tree Expand file tree Collapse file tree 9 files changed +62
-0
lines changed
targets/TARGET_STM/TARGET_STM32F7 Expand file tree Collapse file tree 9 files changed +62
-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)
150150 __PWR_CLK_ENABLE ();
151151 __HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152152
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+
153158 // Enable HSE oscillator and activate PLL with HSE as source
154159 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155160 if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208213 // Enable power clock
209214 __PWR_CLK_ENABLE ();
210215
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+
211221 // Enable HSI oscillator and activate PLL with HSI as source
212222 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213223 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)
150150 __PWR_CLK_ENABLE ();
151151 __HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152152
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+
153158 // Enable HSE oscillator and activate PLL with HSE as source
154159 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155160 if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208213 // Enable power clock
209214 __PWR_CLK_ENABLE ();
210215
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+
211221 // Enable HSI oscillator and activate PLL with HSI as source
212222 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213223 RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
6868 .ANY (+RW +ZI)
6969 }
7070
71+ ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM0_START + MBED_RAM0_SIZE - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
72+ }
73+
7174 ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
7275 }
7376}
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150150 __PWR_CLK_ENABLE ();
151151 __HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152152
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+
153158 // Enable HSE oscillator and activate PLL with HSE as source
154159 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155160 if (bypass == 0 ) {
@@ -208,6 +213,11 @@ uint8_t SetSysClock_PLL_HSI(void)
208213 // Enable power clock
209214 __PWR_CLK_ENABLE ();
210215
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+
211221 // Enable HSI oscillator and activate PLL with HSI as source
212222 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
213223 RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
6868 .ANY (+RW +ZI)
6969 }
7070
71+ ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM0_START + MBED_RAM0_SIZE - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
72+ }
73+
7174 ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
7275 }
7376}
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150150 __PWR_CLK_ENABLE ();
151151 __HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152152
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+
153158 // Enable HSE oscillator and activate PLL with HSE as source
154159 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155160 if (bypass == 0 ) {
@@ -209,6 +214,11 @@ uint8_t SetSysClock_PLL_HSI(void)
209214 // Enable power clock
210215 __PWR_CLK_ENABLE ();
211216
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+
212222 // Enable HSI oscillator and activate PLL with HSI as source
213223 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
214224 RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
6868 .ANY (+RW +ZI)
6969 }
7070
71+ ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM0_START + MBED_RAM0_SIZE - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
72+ }
73+
7174 ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
7275 }
7376}
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
150150 __PWR_CLK_ENABLE ();
151151 __HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1 );
152152
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+
153158 // Enable HSE oscillator and activate PLL with HSE as source
154159 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSE ;
155160 if (bypass == 0 ) {
@@ -212,6 +217,11 @@ uint8_t SetSysClock_PLL_HSI(void)
212217 // Enable power clock
213218 __PWR_CLK_ENABLE ();
214219
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+
215225 // Enable HSI oscillator and activate PLL with HSI as source
216226 RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_HSI ;
217227 RCC_OscInitStruct .HSIState = RCC_HSI_ON ;
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
6868 .ANY (+RW +ZI)
6969 }
7070
71+ ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM0_START + MBED_RAM0_SIZE - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
72+ }
73+
7174 ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
7275 }
7376}
You can’t perform that action at this time.
0 commit comments