aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-23 08:21:00 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-23 08:21:00 +0000
commit4708aa978b7c368e8edd56978ad923208de82266 (patch)
tree51870157fb69ed3ae7aabb97845d56bdb5fee1f6
parentb1c1f94d4ae48d7420c6441cf9f1831dad27c784 (diff)
downloadChibiOS-4708aa978b7c368e8edd56978ad923208de82266.tar.gz
ChibiOS-4708aa978b7c368e8edd56978ad923208de82266.tar.bz2
ChibiOS-4708aa978b7c368e8edd56978ad923208de82266.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5493 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/STM32F37x/adc_lld.c4
-rw-r--r--testhal/STM32F37x/ADC/main.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32F37x/adc_lld.c b/os/hal/platforms/STM32F37x/adc_lld.c
index 98af50a75..ad1979ae3 100644
--- a/os/hal/platforms/STM32F37x/adc_lld.c
+++ b/os/hal/platforms/STM32F37x/adc_lld.c
@@ -502,12 +502,12 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
/* ADC setup.*/
adcp->adc->SR = 0;
- adcp->adc->LTR = grpp->u.adc.htr;
+ adcp->adc->LTR = grpp->u.adc.ltr;
adcp->adc->HTR = grpp->u.adc.htr;
adcp->adc->SMPR1 = grpp->u.adc.smpr[0];
adcp->adc->SMPR2 = grpp->u.adc.smpr[1];
adcp->adc->SQR1 = grpp->u.adc.sqr[0] |
- ADC_SQR1_NUM_CH(grpp->num_channels);
+ ADC_SQR1_NUM_CH(grpp->num_channels);
adcp->adc->SQR2 = grpp->u.adc.sqr[1];
adcp->adc->SQR3 = grpp->u.adc.sqr[2];
diff --git a/testhal/STM32F37x/ADC/main.c b/testhal/STM32F37x/ADC/main.c
index 20e8ff8db..512583a33 100644
--- a/testhal/STM32F37x/ADC/main.c
+++ b/testhal/STM32F37x/ADC/main.c
@@ -149,6 +149,7 @@ int main(void) {
* measurement.
*/
adcStart(&ADCD1, NULL);
+ adcSTM32Calibrate(&ADCD1);
adcSTM32EnableTSVREFE();
adcSTM32EnableVBATE();