aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-29 10:10:15 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-29 10:10:15 +0000
commitd477d161e3846b0b8256995638b78c5c090ac0f2 (patch)
treea6ed489617a1a2adb734b63b2a87a5100913b6b3
parent31c93cbb657b700e23863f2ef6bfa8fab0e12152 (diff)
downloadChibiOS-d477d161e3846b0b8256995638b78c5c090ac0f2.tar.gz
ChibiOS-d477d161e3846b0b8256995638b78c5c090ac0f2.tar.bz2
ChibiOS-d477d161e3846b0b8256995638b78c5c090ac0f2.zip
STM32 ADC driver now working correctly.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1353 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/STM32/adc_lld.c6
1 files 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 */