Skip to content

Commit 86b9664

Browse files
nicoBruhnrleh
authored andcommitted
[platform] stm32g4: fix adc clock source configured incorrectly
1 parent 86a698a commit 86b9664

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/modm/platform/adc/stm32f3/adc.hpp.in

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ public:
103103
NoClock = 0, // No clock selected.
104104
%% if target["family"] in ["g4"]
105105
%% if id in [1, 2]
106-
PllSai1 = RCC_CCIPR_ADC12SEL_0, // PLLSAI1 "R" clock (PLLADC1CLK) selected as ADCs clock
107-
PllSai2 = RCC_CCIPR_ADC12SEL_1, // PLLSAI2 "R" clock (PLLADC2CLK) selected as ADCs clock
108-
SystemClock = RCC_CCIPR_ADC12SEL_1 | RCC_CCIPR_ADC12SEL_0, // System clock selected as ADCs clock
106+
Pll = RCC_CCIPR_ADC12SEL_0, // PLL “P” clock selected as ADC clock
107+
SystemClock = RCC_CCIPR_ADC12SEL_1 , // System clock selected as ADCs clock
109108
%% elif id in [3, 4, 5]
110-
PllSai1 = RCC_CCIPR_ADC345SEL_0, // PLLSAI1 "R" clock (PLLADC1CLK) selected as ADCs clock
111-
PllSai2 = RCC_CCIPR_ADC345SEL_1, // PLLSAI2 "R" clock (PLLADC2CLK) selected as ADCs clock
112-
SystemClock = RCC_CCIPR_ADC345SEL_1 | RCC_CCIPR_ADC345SEL_0, // System clock selected as ADCs clock
109+
Pll = RCC_CCIPR_ADC345SEL_0, // PLL “P” clock selected as ADC clock
110+
SystemClock = RCC_CCIPR_ADC345SEL_1 , // System clock selected as ADCs clock
113111
%% endif
114112
%% else
115113
PllSai1 = RCC_CCIPR_ADCSEL_0, // PLLSAI1 "R" clock (PLLADC1CLK) selected as ADCs clock

0 commit comments

Comments
 (0)