diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-11 17:35:55 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-11 17:35:55 +0000 |
commit | 7d66301e92b84f645e2134819cb9b24caf786d6a (patch) | |
tree | f67fb0e1f9b44a2f4435813b8fbb5fcc2af9ded7 /os/hal | |
parent | 7adef2884e48ab11abd4b2f032263649c2ac22d2 (diff) | |
download | ChibiOS-7d66301e92b84f645e2134819cb9b24caf786d6a.tar.gz ChibiOS-7d66301e92b84f645e2134819cb9b24caf786d6a.tar.bz2 ChibiOS-7d66301e92b84f645e2134819cb9b24caf786d6a.zip |
More STM32 ADC improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2472 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/STM32/adc_lld.c | 6 | ||||
-rw-r--r-- | os/hal/platforms/STM32/adc_lld.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/adc_lld.c b/os/hal/platforms/STM32/adc_lld.c index 1a9069c59..91fd8a6e8 100644 --- a/os/hal/platforms/STM32/adc_lld.c +++ b/os/hal/platforms/STM32/adc_lld.c @@ -204,7 +204,8 @@ void adc_lld_start_conversion(ADCDriver *adcp) { /* ADC setup.*/
adcp->ad_adc->CR1 = grpp->acg_cr1 | ADC_CR1_SCAN;
- adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA | ADC_CR2_ADON;
+ adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA |
+ ADC_CR2_CONT | ADC_CR2_ADON;
adcp->ad_adc->SMPR1 = grpp->acg_smpr1;
adcp->ad_adc->SMPR2 = grpp->acg_smpr2;
adcp->ad_adc->SQR1 = grpp->acg_sqr1;
@@ -212,7 +213,8 @@ void adc_lld_start_conversion(ADCDriver *adcp) { adcp->ad_adc->SQR3 = grpp->acg_sqr3;
/* ADC start by writing ADC_CR2_ADON a second time.*/
- adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA | ADC_CR2_ADON;
+ adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA |
+ ADC_CR2_CONT | ADC_CR2_ADON;
}
/**
diff --git a/os/hal/platforms/STM32/adc_lld.h b/os/hal/platforms/STM32/adc_lld.h index 0850b62f4..92fa21b9d 100644 --- a/os/hal/platforms/STM32/adc_lld.h +++ b/os/hal/platforms/STM32/adc_lld.h @@ -173,8 +173,8 @@ typedef struct { /**
* @brief ADC CR2 register initialization data.
* @note All the required bits must be defined into this field except
- * @p ADC_CR2_DMA and @p ADC_CR2_ADON that are enforced inside the
- * driver.
+ * @p ADC_CR2_DMA, @p ADC_CR2_CONT and @p ADC_CR2_ADON that are
+ * enforced inside the driver.
*/
uint32_t acg_cr2;
/**
|