This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Incorrect reading of IDR of GPIOA

If i am using a button conntected to pin 1 of GPIOA ..
GPIOA_ENABLE_CLOCK();
GPIOA->MODER |=PIN_INPUT;
GPIOA->PUPD |=NO_PULLUP_NO_PULL_DOWN;
GPIOA->ODR |=(1 << 1); //this for external pull up resistor
when i debug GPIOA IDR I found that IDR = 0x0000DFD9 .
which means that pin 1 level is low , although i am connecting it to an external pull resistor ... why GPIOA->IDR is not 0x0000DFDB???why it is set to 0 pin 1?????