From 91aed554b8d5c181162472d5faf0c8fa9496c62e Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Fri, 30 Dec 2016 15:57:53 +0000 Subject: Fixed Bug #807 git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10000 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'os') diff --git a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c index d4bc0da26..4ffae09a2 100644 --- a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c +++ b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c @@ -559,7 +559,15 @@ void adc_lld_init(void) { #if defined(STM32L4XX) rccEnableADC123(FALSE); rccResetADC123(); + +#if defined(ADC1_2_COMMON) + ADC1_2_COMMON->CCR = STM32_ADC_ADC123_CLOCK_MODE | ADC_DMA_MDMA; +#elif defined(ADC123_COMMON) ADC123_COMMON->CCR = STM32_ADC_ADC123_CLOCK_MODE | ADC_DMA_MDMA; +#else + ADC1_COMMON->CCR = STM32_ADC_ADC123_CLOCK_MODE | ADC_DMA_MDMA; +#endif + rccDisableADC123(FALSE); #endif } -- cgit v1.2.3