Skip to content

Commit 849a8be

Browse files
committed
Add missing ADC clock config for Generic F103xE
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 8a79938 commit 849a8be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: variants/Generic_F103Rx/variant.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ WEAK void SystemClock_Config(void)
120120
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
121121
Error_Handler();
122122
}
123-
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
123+
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB;
124+
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6;
124125
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5;
125126
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) {
126127
Error_Handler();

0 commit comments

Comments
 (0)