aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32L1xx/ADC
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-24 17:58:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-24 17:58:27 +0000
commit46870077b874696c09704da37dc4c33c8eb21402 (patch)
tree83bb86cc7e257025e0787f80b4e6d09e917926bf /testhal/STM32L1xx/ADC
parent5a74dd3c2e3aa7c2a72f1bfe69a39b047710c429 (diff)
downloadChibiOS-46870077b874696c09704da37dc4c33c8eb21402.tar.gz
ChibiOS-46870077b874696c09704da37dc4c33c8eb21402.tar.bz2
ChibiOS-46870077b874696c09704da37dc4c33c8eb21402.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3523 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32L1xx/ADC')
-rw-r--r--testhal/STM32L1xx/ADC/main.c18
-rw-r--r--testhal/STM32L1xx/ADC/mcuconf.h3
2 files changed, 12 insertions, 9 deletions
diff --git a/testhal/STM32L1xx/ADC/main.c b/testhal/STM32L1xx/ADC/main.c
index c13ebfe2a..2af3703e8 100644
--- a/testhal/STM32L1xx/ADC/main.c
+++ b/testhal/STM32L1xx/ADC/main.c
@@ -61,12 +61,13 @@ static const ADCConversionGroup adcgrpcfg1 = {
ADC_GRP1_NUM_CHANNELS,
NULL,
adcerrorcallback,
- 0, 0, /* CR1, CR2 */
- 0, /* SMPR1 */
+ 0, /* CR1 */
+ ADC_CR2_SWSTART, /* CR2 */
+ 0, /* SMPR1 */
ADC_SMPR2_SMP_AN10(ADC_SAMPLE_4),
- 0, /* SMPR3 */
+ 0, /* SMPR3 */
ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS),
- 0, 0, 0, /* SQR2, SQR3, SQR4 */
+ 0, 0, 0, /* SQR2, SQR3, SQR4 */
ADC_SQR5_SQ1_N(ADC_CHANNEL_IN10)
};
@@ -80,13 +81,14 @@ static const ADCConversionGroup adcgrpcfg2 = {
ADC_GRP2_NUM_CHANNELS,
adccallback,
adcerrorcallback,
- 0, 0, /* CR1, CR2 */
- 0, /* SMPR1 */
+ 0, /* CR1 */
+ ADC_CR2_SWSTART, /* CR2 */
+ 0, /* SMPR1 */
ADC_SMPR2_SMP_AN11(ADC_SAMPLE_48) | ADC_SMPR2_SMP_AN10(ADC_SAMPLE_48) |
ADC_SMPR2_SMP_SENSOR(ADC_SAMPLE_192) | ADC_SMPR2_SMP_VREF(ADC_SAMPLE_192),
- 0, /* SMPR3 */
+ 0, /* SMPR3 */
ADC_SQR1_NUM_CH(ADC_GRP2_NUM_CHANNELS),
- 0, 0, /* SQR2, SQR3 */
+ 0, 0, /* SQR2, SQR3 */
ADC_SQR4_SQ8_N(ADC_CHANNEL_SENSOR) | ADC_SQR4_SQ7_N(ADC_CHANNEL_VREFINT),
ADC_SQR5_SQ6_N(ADC_CHANNEL_IN11) | ADC_SQR5_SQ5_N(ADC_CHANNEL_IN10) |
ADC_SQR5_SQ4_N(ADC_CHANNEL_IN11) | ADC_SQR5_SQ3_N(ADC_CHANNEL_IN10) |
diff --git a/testhal/STM32L1xx/ADC/mcuconf.h b/testhal/STM32L1xx/ADC/mcuconf.h
index b2ad1faca..a75fb49cf 100644
--- a/testhal/STM32L1xx/ADC/mcuconf.h
+++ b/testhal/STM32L1xx/ADC/mcuconf.h
@@ -61,7 +61,8 @@
*/
#define STM32_ADC_USE_ADC1 TRUE
#define STM32_ADC_ADC1_DMA_PRIORITY 2
-#define STM32_ADC_ADC1_IRQ_PRIORITY 5
+#define STM32_ADC_IRQ_PRIORITY 5
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
/*
* CAN driver system settings.