From d477d161e3846b0b8256995638b78c5c090ac0f2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 29 Nov 2009 10:10:15 +0000 Subject: STM32 ADC driver now working correctly. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1353 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/adc_lld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/hal/platforms/STM32/adc_lld.c b/os/hal/platforms/STM32/adc_lld.c index abfdb0a43..a48f7e9af 100644 --- a/os/hal/platforms/STM32/adc_lld.c +++ b/os/hal/platforms/STM32/adc_lld.c @@ -161,10 +161,10 @@ void adc_lld_start(ADCDriver *adcp) { } #endif - /* ADC activation, the calibration procedure has already been performed + /* ADC setup, the calibration procedure has already been performed during initialization.*/ adcp->ad_adc->CR1 = ADC_CR1_SCAN; - adcp->ad_adc->CR2 = ADC_CR2_ADON; + adcp->ad_adc->CR2 = 0; } } @@ -235,8 +235,8 @@ void adc_lld_start_conversion(ADCDriver *adcp) { */ void adc_lld_stop_conversion(ADCDriver *adcp) { - adcp->ad_adc->CR2 = ADC_CR2_ADON; adcp->ad_dma->CCR = 0; + adcp->ad_adc->CR2 = 0; } #endif /* CH_HAL_USE_ADC */ -- cgit v1.2.3