Skip to content

STM32F4 Discovery: Unable to set port D pin direction as OUTPUT #2679

@louismdavis

Description

@louismdavis

I have been testing out 5.0.0 on an STM32F407 Discovery board and noticed I was unable to set any of the LED pins as OUTPUT. After setting the pin direction, it would always read back as INPUT.

I was looking through the source and noticed within the stm32f4_peripherals_gpio_init() function that only ports A,B and C are enabled.

ports/stm32f4/peripherals/stm32f4/stm32f407xx/gpio.c

void stm32f4_peripherals_gpio_init(void) {
//Enable all GPIO for now
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions