aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-12-30 15:57:53 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-12-30 15:57:53 +0000
commit91aed554b8d5c181162472d5faf0c8fa9496c62e (patch)
tree40b30d733061a56db00b5ccd3f948c8f4600dcb8 /os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c
parente6acaa5a460cc42ecd46f650a74312d6293a644c (diff)
downloadChibiOS-91aed554b8d5c181162472d5faf0c8fa9496c62e.tar.gz
ChibiOS-91aed554b8d5c181162472d5faf0c8fa9496c62e.tar.bz2
ChibiOS-91aed554b8d5c181162472d5faf0c8fa9496c62e.zip
Fixed Bug #807
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10000 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c')
-rw-r--r--os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c8
1 files changed, 8 insertions, 0 deletions
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
}