diff options
Diffstat (limited to 'os/hal/platforms/STM32/adc_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/adc_lld.c | 6 |
1 files changed, 4 insertions, 2 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;
}
/**
|