AnsweredAssumed Answered

Reading from GPIO PD

Question asked by khalo.hilwane on May 9, 2014
Latest reply on May 12, 2014 by khalo.hilwane
Hi all,

I'm using Discovery F3. I have a problem to read my input GPIO PD.
The configuration is as indicated below:

/* GPIOD Periph clock enable */

 /* Configure PD4, PD10 input mode */
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4 | GPIO_Pin_10;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;
  GPIO_Init(GPIOD, &GPIO_InitStructure);

The PD10 is controlled by an external command that switch between 0 and 1(3v), 
In main i add this code:
while(Ctrl_Status==0x00)  // Waiting for the Ctrl_Status to be 0x01
                    cpt=(GPIOD->IDR & GPIO_Pin_10);

The problem is that the Led is always blanking even before applying my 3v, that means that the PD0 is always high.
any opinions ?