STM32F429BIT6 PB6 & 7 as GPIO.
I tried configuring PB6 and 7 as GPIO but PB7 always stuck at H and PB6 always L.
Here are my codes for PB7. I read in other forum they face similar issues when configuring these pins as I2C, and the issue is with the sequence of initialization. Please advise.
//green LED
#define LED_GREEN_PIN GPIO_PIN_7
#define LED_GREEN_PORT GPIOB
#define LED_GREEN_GPIO_MODE GPIO_MODE_INPUT
#define LED_GREEN_GPIO_PULL GPIO_PULLDOWN
#define LED_GREEN_GPIO_SPEED GPIO_SPEED_FAST
#define LED_GREEN_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
GPIO_Init_Structure.Pin = LED_GREEN_PIN;
GPIO_Init_Structure.Pull = GPIO_NOPULL;
GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
GPIO_Init_Structure.Mode = GPIO_MODE_OUTPUT_PP;
LED_GREEN_CLK_ENABLE();
HAL_GPIO_Init(LED_GREEN_PORT, &GPIO_Init_Structure);
HAL_GPIO_WritePin(LED_GREEN_PORT,LED_GREEN_PIN, GPIO_PIN_RESET);