The bit under STM32_ODR_MASK << STM32_ODR_SHIFT is based on DT pin definition and it encodes if output pin should have low or high level.
This means that if there is defined low level (encoded as 0) then if (gpio_out != 0) will cause configuration of pin as input.
To Reproduce
Steps to reproduce the behavior:
Build application with pinctrl pin definition like above and observerve pin behaviour.
Expected behavior
For the GPIO pin the pin direction should be deduced basing on drive-push-pull or drive-open-drain atributes.
Impact
showstopper
Logs and console output
Environment (please complete the following information):
Describe the bug Following pinctrl pin definition for STM32WB55 does not set pin as push-pull (and sets pin as digital input):
In the
pinctrl_configure_pins
function in pinctrl_stm32.c there is following code:The bit under
STM32_ODR_MASK << STM32_ODR_SHIFT
is based on DT pin definition and it encodes if output pin should have low or high level. This means that if there is defined low level (encoded as 0) thenif (gpio_out != 0)
will cause configuration of pin as input.To Reproduce Steps to reproduce the behavior: Build application with pinctrl pin definition like above and observerve pin behaviour.
Expected behavior For the GPIO pin the pin direction should be deduced basing on
drive-push-pull
ordrive-open-drain
atributes.Impact showstopper
Logs and console output
Environment (please complete the following information):
Additional context