aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32L1xx/adc_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-28 12:21:17 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-28 12:21:17 +0000
commita91b8d62dd80e0a93c17070df7a624b9696d65da (patch)
treee0689dfdb84d8127d2438be97ae8c42d87f8832e /os/hal/ports/STM32/STM32L1xx/adc_lld.c
parentff9bc27d92273bb5c0fb6fbe026567f25fe93fa3 (diff)
downloadChibiOS-a91b8d62dd80e0a93c17070df7a624b9696d65da.tar.gz
ChibiOS-a91b8d62dd80e0a93c17070df7a624b9696d65da.tar.bz2
ChibiOS-a91b8d62dd80e0a93c17070df7a624b9696d65da.zip
Fixed bug #520.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7106 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32L1xx/adc_lld.c')
-rw-r--r--os/hal/ports/STM32/STM32L1xx/adc_lld.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32L1xx/adc_lld.c b/os/hal/ports/STM32/STM32L1xx/adc_lld.c
index 424d5cf1f..ad7700fb6 100644
--- a/os/hal/ports/STM32/STM32L1xx/adc_lld.c
+++ b/os/hal/ports/STM32/STM32L1xx/adc_lld.c
@@ -159,6 +159,8 @@ void adc_lld_start(ADCDriver *adcp) {
}
#endif /* STM32_ADC_USE_ADC1 */
+ ADC->CCR = (ADC->CCR & ADC_CCR_TSVREFE) | (STM32_ADC_ADCPRE << 16);
+
/* ADC initial setup, starting the analog part here in order to reduce
the latency when starting a conversion.*/
adcp->adc->CR1 = 0;