Skip to content

Commit 0afe053

Browse files
jeromecoutantadbridge
authored andcommitted
STM32L496 : wrong ADC init
1 parent 12a0446 commit 0afe053

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

targets/TARGET_STM/TARGET_STM32L4/analogin_device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ void analogin_init(analogin_t *obj, PinName pin)
8282
obj->handle.Init.DMAContinuousRequests = DISABLE;
8383
obj->handle.Init.Overrun = ADC_OVR_DATA_OVERWRITTEN; // DR register is overwritten with the last conversion result in case of overrun
8484
obj->handle.Init.OversamplingMode = DISABLE; // No oversampling
85+
#if defined(ADC_CFGR_DFSDMCFG) &&defined(DFSDM1_Channel0)
86+
obj->handle.Init.DFSDMConfig = 0;
87+
#endif
8588

8689
// Enable ADC clock
8790
__HAL_RCC_ADC_CLK_ENABLE();

0 commit comments

Comments
 (0)