Clarifying some doubts regarding PUPDR register of the GPIO [STM32]
From the datasheet, the value of both the pull up and pull down resistors is nominally 40K. (Note that often pull up and down values may be different.)
For the case of PC13, note the value of the external pull up resistor - 4K7. This is much lower than the internal pull resistors.

If the pull up is enabled, the resultant value is 4K7 || 40K, which is  4K2.

If the pull down is enabled, then it forms a voltage divider. Because the pull down is much greater than the 4K7, the input voltage will be above the high threshold.


They have probably put a stronger pull up here as they know it's going to be used for a switch, and has potential to pick up external interference. They also have the charge C15 quickly enough for debouncing, but remaining responsive. If the pull
For PA5, again the value of the pull up resistor is so high that there will not be enough current to light the LED.