aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c8
-rw-r--r--readme.txt2
2 files changed, 10 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
}
diff --git a/readme.txt b/readme.txt
index 6a6b44956..f1c0cb5fd 100644
--- a/readme.txt
+++ b/readme.txt
@@ -153,6 +153,8 @@
- RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
+- HAL: Fixed wrong initialization in ADC lld v3 (bug #807)
+ (backported to 16.1.6).
- HAL: Fixed wrong clock init in STM32F0 port ad added more error checks
(bug #806)(backported to 16.1.6).
- HAL: Fixed misplaced else in STM32F0 port (bug #805)