File tree Expand file tree Collapse file tree
firmware/hw_layer/ports/stm32 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ static constexpr ADCConversionGroup convGroupSlow = {
9797 .num_channels = slowChannelCount,
9898 .end_cb = adc_callback,
9999 .error_cb = nullptr ,
100- .cfgr = ADC_CFGR_EXTEN_0 | (4 << ADC_CFGR_EXTSEL_Pos), // External trigger ch4, rising edge: TIM3 TRGO
100+ // OVRMOD=1 is required by H7 errata "ADC slave data may be shifted in Dual regular simultaneous mode" -
101+ // without it, a single-DMA-channel read of CDR can leave the slave's samples offset from the master's.
102+ .cfgr = ADC_CFGR_EXTEN_0 | (4 << ADC_CFGR_EXTSEL_Pos) | ADC_CFGR_OVRMOD , // External trigger ch4, rising edge: TIM3 TRGO
101103 .cfgr2 = (H7_ADC_OVERSAMPLE - 1 ) << ADC_CFGR2_OVSR_Pos | // Oversample by Nx (register contains N-1)
102104 H7_ADC_SHIFT_BITS << ADC_CFGR2_OVSS_Pos | // shift the result right log2(N) bits to make a 16 bit result out of the internal oversample sum
103105 ADC_CFGR2_ROVSE , // Enable oversampling
You can’t perform that action at this time.
0 commit comments