aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/ADCv4
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-01-17 14:55:12 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-01-17 14:55:12 +0000
commitc953aa5ac86e4f913c41333a773a0903e0860d35 (patch)
treed2c00d4f0eaf25892e5d4f4ade85b2866e2c38de /os/hal/ports/STM32/LLD/ADCv4
parentdf330879bb5c5630e847e2e9eec471080b0d18a4 (diff)
downloadChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.tar.gz
ChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.tar.bz2
ChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.zip
Defaulted all STM32 drivers to enable peripheral clocks during stop/sleep modes. Now RCC macros are able to set or clear the LP bit of a peripheral.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11300 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/ADCv4')
-rw-r--r--os/hal/ports/STM32/LLD/ADCv4/hal_adc_lld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/ADCv4/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv4/hal_adc_lld.c
index 5e98cfbd8..aa0436e15 100644
--- a/os/hal/ports/STM32/LLD/ADCv4/hal_adc_lld.c
+++ b/os/hal/ports/STM32/LLD/ADCv4/hal_adc_lld.c
@@ -360,13 +360,13 @@ void adc_lld_init(void) {
/* ADC units pre-initializations.*/
#if (STM32_HAS_ADC1 == TRUE) && (STM32_HAS_ADC2 == TRUE)
#if STM32_ADC_USE_ADC12 == TRUE
- rccEnableADC12(false);
+ rccEnableADC12(true);
rccResetADC12();
ADC12_COMMON->CCR = STM32_ADC_ADC12_CLOCK_MODE | ADC_DMA_DAMDF;
rccDisableADC12();
#endif
#if STM32_ADC_USE_ADC3 == TRUE
- rccEnableADC3(false);
+ rccEnableADC3(true);
rccResetADC3();
ADC3_COMMON->CCR = STM32_ADC_ADC3_CLOCK_MODE | ADC_DMA_DAMDF;
rccDisableADC3();
@@ -398,7 +398,7 @@ void adc_lld_start(ADCDriver *adcp) {
(stm32_dmaisr_t)adc_lld_serve_dma_interrupt,
(void *)adcp);
osalDbgAssert(!b, "stream already allocated");
- rccEnableADC12(false);
+ rccEnableADC12(true);
}
#endif /* STM32_ADC_USE_ADC12 == TRUE */
@@ -410,7 +410,7 @@ void adc_lld_start(ADCDriver *adcp) {
(stm32_dmaisr_t)adc_lld_serve_dma_interrupt,
(void *)adcp);
osalDbgAssert(!b, "stream already allocated");
- rccEnableADC3(false);
+ rccEnableADC3(true);
}
#endif /* STM32_ADC_USE_ADC3 == TRUE */