diff options
-rw-r--r-- | os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c | 8 | ||||
-rw-r--r-- | readme.txt | 2 |
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)
|