How do I configure the pullup on GPIO_PIN 6 for STM32G031J6
Problem is that the voltage does not rise to 3.3V, I measure it at 1.64V. The pin has nothing connected to it and I tried this on 2 MCUs.
Using STM32CubeIDE 1.2.0 Build: 5034_20200108_0926, I created a simple project and configured pin PB6 as GPIO_INPUT. In the GPIO configuration I set PB6 to pull-up. Nothing else configured, everything else is at default settings. The code generated looks correct:
static void MX_GPIO_Init(void) {
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin : PB6 */
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
}
NRST_MODE in the user option bytes is set to 1, but this shouldn't affect anything.
It's almost as if this pin is bonded to something else that is trying to pull it low. What can I do to get this pin working?