STM32G441 GPIO PB4 and PB6 pullup not working
Hello,
I am having a strage problem with setting up simple input pins on PB3, PB4, PB5, PB6 and PB7 with pullup on a G441 bare metal. I set the bits in the GPIOB_MODER and GPIOB_PUPDR acordingly and also read them back to make sure. They are correct.
GPIOB->MODER &= ~(0b1111111111000000); // GPIOB 3 to 7 inputs
GPIOB->PUPDR &= ~(0b1111111111000000); // GPIOB 3 to 7 pullup
GPIOB->PUPDR |= (0b0101010101000000); // GPIOB 3 to 7 pullup
Strangly the PB4 and PB6 stay low most of the time as if they are floating. I can not figure out why that would be. Did I miss something special about them? I know PB4 is a JTAG debug pin but setting the MODER shoud set it as a normal input. If I pull the pin to 5V externally it goes high (PB6 is FT).