Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7602a65

Browse filesBrowse files
committed
Nucleo F207ZG has no HSE by default, use HSI
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 4b81743 commit 7602a65
Copy full SHA for 7602a65

File tree

Expand file treeCollapse file tree

1 file changed

+12
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-15
lines changed

‎variants/NUCLEO_F207ZG/variant.cpp

Copy file name to clipboardExpand all lines: variants/NUCLEO_F207ZG/variant.cpp
+12-15Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,22 @@ WEAK void SystemClock_Config(void)
164164
RCC_OscInitTypeDef RCC_OscInitStruct;
165165
RCC_ClkInitTypeDef RCC_ClkInitStruct;
166166

167-
/**Initializes the CPU, AHB and APB busses clocks
168-
*/
169-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
170-
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
167+
/* Initializes the CPU, AHB and APB busses clocks */
168+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
169+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
170+
RCC_OscInitStruct.HSICalibrationValue = 16;
171171
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
172-
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
173-
RCC_OscInitStruct.PLL.PLLM = 8;
174-
RCC_OscInitStruct.PLL.PLLN = 240;
172+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
173+
RCC_OscInitStruct.PLL.PLLM = 13;
174+
RCC_OscInitStruct.PLL.PLLN = 195;
175175
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
176176
RCC_OscInitStruct.PLL.PLLQ = 5;
177177
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
178178
{
179-
while(1);
179+
_Error_Handler(__FILE__, __LINE__);
180180
}
181181

182-
/**Initializes the CPU, AHB and APB busses clocks
183-
*/
182+
/* Initializes the CPU, AHB and APB busses clocks */
184183
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
185184
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
186185
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
@@ -190,15 +189,13 @@ WEAK void SystemClock_Config(void)
190189

191190
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
192191
{
193-
while(1);
192+
_Error_Handler(__FILE__, __LINE__);
194193
}
195194

196-
/**Configure the Systick interrupt time
197-
*/
195+
/* Configure the Systick interrupt time */
198196
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
199197

200-
/**Configure the Systick
201-
*/
198+
/* Configure the Systick */
202199
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
203200

204201
/* SysTick_IRQn interrupt configuration */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.