summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3240g-eval
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-03 23:25:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-03 23:25:49 +0000
commit6ab3a2a10626f28693ff0b7db7c41e5b9e760131 (patch)
treeef4e43b32b283e3844cdc3490183282e21a93f03 /nuttx/configs/stm3240g-eval
parent1940235b4d0905284790420442463d41d5905f15 (diff)
downloadpx4-nuttx-6ab3a2a10626f28693ff0b7db7c41e5b9e760131.tar.gz
px4-nuttx-6ab3a2a10626f28693ff0b7db7c41e5b9e760131.tar.bz2
px4-nuttx-6ab3a2a10626f28693ff0b7db7c41e5b9e760131.zip
Fixes for STM32 ADC driver on the F4; LC17xx LED initial state
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4257 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3240g-eval')
-rwxr-xr-xnuttx/configs/stm3240g-eval/README.txt2
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_adc.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt
index 4ff229f4e..cdf3d82ae 100755
--- a/nuttx/configs/stm3240g-eval/README.txt
+++ b/nuttx/configs/stm3240g-eval/README.txt
@@ -603,7 +603,9 @@ Where <subdir> is one of the following:
CONFIG_ADC=y : Enable the generic ADC infrastructure
CONFIG_STM32_ADC3=y : Enable ADC3
+ CONFIG_STM32_TIM1=y : Enable Timer 1
CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to driver ADC3 sampling
+ CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency
See also apps/examples/README.txt
diff --git a/nuttx/configs/stm3240g-eval/src/up_adc.c b/nuttx/configs/stm3240g-eval/src/up_adc.c
index d376e4036..e42651761 100644
--- a/nuttx/configs/stm3240g-eval/src/up_adc.c
+++ b/nuttx/configs/stm3240g-eval/src/up_adc.c
@@ -40,6 +40,7 @@
#include <nuttx/config.h>
+#include <errno.h>
#include <debug.h>
#include <nuttx/analog/adc.h>
@@ -136,7 +137,7 @@ int adc_devinit(void)
/* Call stm32_adcinitialize() to get an instance of the ADC interface */
- adc = stm32_adcinitialize(1, g_chanlist, ADC3_NCHANNELS);
+ adc = stm32_adcinitialize(3, g_chanlist, ADC3_NCHANNELS);
if (adc == NULL)
{
adbg("ERROR: Failed to get ADC interface\n");