Merge pull request #8119 from jeromecoutant/PR_L4_ADC

STM32L496 : wrong ADC init
pull/8337/head
Martin Kojtal 2018-10-05 19:53:25 +02:00 committed by GitHub
commit 72fa1e0e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,9 @@ void analogin_init(analogin_t *obj, PinName pin)
obj->handle.Init.DMAContinuousRequests = DISABLE;
obj->handle.Init.Overrun = ADC_OVR_DATA_OVERWRITTEN; // DR register is overwritten with the last conversion result in case of overrun
obj->handle.Init.OversamplingMode = DISABLE; // No oversampling
#if defined(ADC_CFGR_DFSDMCFG) &&defined(DFSDM1_Channel0)
obj->handle.Init.DFSDMConfig = 0;
#endif
// Enable ADC clock
__HAL_RCC_ADC_CLK_ENABLE();