aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-30 13:35:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-30 13:35:12 +0000
commit567fd6ac1290c0aa80c861cee47daa3150810586 (patch)
tree6e864f5b98466a633b7ef2c9e3a38534c076c394 /os/hal/platforms
parent0403ccfd10fc6b424be4a4aea8196c9038b64a38 (diff)
downloadChibiOS-567fd6ac1290c0aa80c861cee47daa3150810586.tar.gz
ChibiOS-567fd6ac1290c0aa80c861cee47daa3150810586.tar.bz2
ChibiOS-567fd6ac1290c0aa80c861cee47daa3150810586.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4998 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32F3xx/adc_lld.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32F3xx/adc_lld.c b/os/hal/platforms/STM32F3xx/adc_lld.c
index 874067140..e661b4b9c 100644
--- a/os/hal/platforms/STM32F3xx/adc_lld.c
+++ b/os/hal/platforms/STM32F3xx/adc_lld.c
@@ -89,6 +89,7 @@ ADCDriver ADCD3;
*/
static void adc_lld_vreg_on(ADCDriver *adcp) {
+ adcp->adcm->CR = 0; /* RM 12.4.3.*/
adcp->adcm->CR = ADC_CR_ADVREGEN_0;
#if STM32_ADC_DUAL_MODE
adcp->adcs->CR = ADC_CR_ADVREGEN_0;
@@ -103,6 +104,7 @@ static void adc_lld_vreg_on(ADCDriver *adcp) {
*/
static void adc_lld_vreg_off(ADCDriver *adcp) {
+ adcp->adcm->CR = 0; /* RM 12.4.3.*/
adcp->adcm->CR = ADC_CR_ADVREGEN_1;
#if STM32_ADC_DUAL_MODE
adcp->adcs->CR = ADC_CR_ADVREGEN_1;
@@ -479,7 +481,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
ccr |= ADC_CCR_DMACFG_CIRCULAR;
cfgr |= ADC_CFGR_CONT;
#else
- cfgr |= ADC_CFGR_CONT | ADC_CFGR_DMACFG | ADC_CFGR_DMAEN;
+ cfgr |= ADC_CFGR_CONT | ADC_CFGR_DMACFG_CIRCULAR | ADC_CFGR_DMAEN;
#endif
}