Nucleo-144 Moved ADC to chan 3

This commit is contained in:
David Sidrane 2016-06-18 08:08:28 -10:00
parent 971dc71183
commit df64a68b15

View File

@ -84,9 +84,6 @@
/************************************************************************************ /************************************************************************************
* Private Data * Private Data
************************************************************************************/ ************************************************************************************/
/* The Olimex STM32-P405 has a 10 Kohm potentiometer AN_TR connected to PC0
* ADC123_IN10
*/
/* Identifying number of each ADC channel: Variable Resistor. /* Identifying number of each ADC channel: Variable Resistor.
* *
@ -94,7 +91,7 @@
*/ */
#ifdef CONFIG_STM32F7_ADC1 #ifdef CONFIG_STM32F7_ADC1
static const uint8_t g_chanlist[ADC1_NCHANNELS] = {1}; static const uint8_t g_chanlist[ADC1_NCHANNELS] = {3};
/* Configurations of pins used byte each ADC channels /* Configurations of pins used byte each ADC channels
* *
@ -103,7 +100,7 @@ static const uint8_t g_chanlist[ADC1_NCHANNELS] = {1};
* GPIO_ADC1_IN11, GPIO_ADC1_IN12, GPIO_ADC1_IN13, GPIO_ADC1_IN15}; * GPIO_ADC1_IN11, GPIO_ADC1_IN12, GPIO_ADC1_IN13, GPIO_ADC1_IN15};
*/ */
static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN0}; static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN3};
#endif #endif
/************************************************************************************ /************************************************************************************
@ -152,7 +149,10 @@ int board_adc_initialize(void)
for (i = 0; i < ADC1_NCHANNELS; i++) for (i = 0; i < ADC1_NCHANNELS; i++)
{ {
stm32_configgpio(g_pinlist[i]); if (g_pinlist[i] != 0)
{
stm32_configgpio(g_pinlist[i]);
}
} }
/* Call stm32_adcinitialize() to get an instance of the ADC interface */ /* Call stm32_adcinitialize() to get an instance of the ADC interface */