Question
Problem with ADC from STM32F207
Posted on May 25, 2015 at 20:51
Hallo,
I try to read the ADC but get allways 0 als result :-( Does anybody have an Idea whats wrong?GPIO_Clk_Enable(@GPIOA_BASE);
GPIO_Config(@GPIOA_BASE,_GPIO_PINMASK_All,_GPIO_CFG_MODE_ANALOG or _GPIO_CFG_PULL_NO);
ADON_bit :=1; // ADC on/off
CONT_bit :=1; // use continius measurement
ADC1_CR1 := %00000010000000000000000000000000;
ADC1_CR2 := %01000000000000000000000000000011;
ADC1_SQR1 := %00000000000000000000000000000000;
ADC1_SQR3 := %00000000000000000000000000000000;
//ADC1_SMPR1 := %0000000000000000000000000000000;
//ADC1_SMPR2 := %0000000000000000000000000000000;
SWSTART_bit := 1; //start conversion
while EOC1_bit = 1 DO nop;value := ADC1_DR;