This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPIO PF0 not working properly. Even after unlocking it.

I am trying to read the status of PF0. I wrote two configurations for PF0, the first one :

    GPIOF->DIR &=~(1<<0); //Make PF0 INPUT
    GPIOF->DEN |= 0XFF; //ENABLE DIGITAL FUNCTION ON PORT F
    GPIOF->PUR &= 0X00; //DISABLE PULL UP RESISTOR ON PORT F

As it appears in the memory map the DATA register for PF. The PF0 is reading zero, which is an unexpected value for two reasons. The first reason is I didn't unlock the PORT, the second reason is I am reading 2.97 v, using the multimeter. 

My second configuration:

    GPIOF->LOCK = 0X4C4F434B; //Unlock PORT F
    GPIOF->CR |= 0XFF; //Enable writing to DIR, DEN and PUR register
    GPIOF->DIR &=~(1<<0); //Make PF0 INPUT
    GPIOF->DEN |= 0XFF; //ENABLE DIGITAL FUNCTION ON PORT F
    GPIOF->PUR &= 0X00; //DISABLE PULL UP RESISTOR ON PORT F

The read value in this case is one. which is again an unexpected value. Since I did unlock the port and disabled the pull up resistor, and the value is still 1. When I measured the voltage it's still 2.97 v, and I don't know why this voltage is not even enough to power up a LED. 

Any explanation to what is going on ?