File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -151,14 +151,14 @@ extern "C" {
151
151
/* *
152
152
* @brief System Clock Configuration
153
153
* The system Clock is configured as follow :
154
- * System Clock source = PLL (HSI )
154
+ * System Clock source = PLL (HSE )
155
155
* SYSCLK(Hz) = 216000000
156
156
* HCLK(Hz) = 216000000
157
157
* AHB Prescaler = 1
158
158
* APB1 Prescaler = 4
159
159
* APB2 Prescaler = 2
160
160
* HSE Frequency(Hz) = 16000000
161
- * PLL_M = 8
161
+ * PLL_M = 4
162
162
* PLL_N = 216
163
163
* PLL_P = 2
164
164
* PLL_Q = 9
@@ -182,12 +182,11 @@ WEAK void SystemClock_Config(void)
182
182
__HAL_PWR_VOLTAGESCALING_CONFIG (PWR_REGULATOR_VOLTAGE_SCALE1);
183
183
/* * Initializes the CPU, AHB and APB busses clocks
184
184
*/
185
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
186
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
187
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
185
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
186
+ RCC_OscInitStruct.HSEState = RCC_HSE_ON; // RCC_HSE_BYPASS;
188
187
RCC_OscInitStruct.PLL .PLLState = RCC_PLL_ON;
189
- RCC_OscInitStruct.PLL .PLLSource = RCC_PLLSOURCE_HSI ;
190
- RCC_OscInitStruct.PLL .PLLM = 8 ;
188
+ RCC_OscInitStruct.PLL .PLLSource = RCC_PLLSOURCE_HSE ;
189
+ RCC_OscInitStruct.PLL .PLLM = 4 ;
191
190
RCC_OscInitStruct.PLL .PLLN = 216 ;
192
191
RCC_OscInitStruct.PLL .PLLP = RCC_PLLP_DIV2;
193
192
RCC_OscInitStruct.PLL .PLLQ = 9 ;
Original file line number Diff line number Diff line change 23
23
extern "C" {
24
24
#endif // __cplusplus
25
25
26
+ #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
27
+
26
28
/*----------------------------------------------------------------------------
27
29
* Pins
28
30
*----------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments