STM32F746ZG Nucleo144 ADC Problem
Posted: Thu May 19, 2016 10:41 am
Hi,
I just got an STM32F746ZG Nucleo144 and I'm testing the ADC conversion demo from the same MCU but Discovery version, since I think there are no official demos for this board. The ADC callback is not executing, maybe there are some difference on the boards? I changed the input to use the AN3 and AN10, do I need to declare the inputs as analog?
Also here's the configuration code for the ADC,
Maybe i'm doing something wrong.
Thanks in advance
LM
I just got an STM32F746ZG Nucleo144 and I'm testing the ADC conversion demo from the same MCU but Discovery version, since I think there are no official demos for this board. The ADC callback is not executing, maybe there are some difference on the boards? I changed the input to use the AN3 and AN10, do I need to declare the inputs as analog?
Code: Select all
palSetLineMode(LINE_ADC123_IN3, PAL_MODE_INPUT_ANALOG);
palSetLineMode(LINE_ADC123_IN10, PAL_MODE_INPUT_ANALOG);Also here's the configuration code for the ADC,
Code: Select all
static const ADCConversionGroup adcgrpcfg1 =
{
true,
ADC_GRP1_NUM_CHANNELS,
adccallback,
adcerrorcallback,
0, /* CR1 */
ADC_CR2_EXTEN_RISING | ADC_CR2_EXTSEL_SRC(12), /* CR2 */
ADC_SMPR2_SMP_AN3(ADC_SAMPLE_144) | ADC_SMPR1_SMP_AN10(ADC_SAMPLE_144),
0, /* SMPR2 */
ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS), /* SQR1 */
0, /* SQR1 */
ADC_SQR3_SQ2_N(ADC_CHANNEL_IN10) | ADC_SQR3_SQ1_N(ADC_CHANNEL_IN3)
};Maybe i'm doing something wrong.
Thanks in advance
LM