Skip to main content
Visitor II
September 8, 2021
Solved

stm32mp1 unused pins configure as gpio

  • September 8, 2021
  • 1 reply
  • 1025 views

Hi I have list of unused pins need to configure as a GPIO, and some as a AF's, do we have any driver which shall facilated unused pins by default set pins state., we have in imx6 IOMUX which does that job in kernel., in mp1 i didnt find that.

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi,

    there is no need to declare 'unused' GPIOs, they are all by default assigned by the HW as Analog mode (See GPIOx_MODER in product Reference Manual), which is best for power consumption and noise.

    Then, using Device Tree you could map required IOs to peripheral functions or GPIO function (e.g. LEDs).

    Initialization of GPIO IP is done either on uBoot/Linux side (for IOs devoted to uBoot/Linux) or Cortex-M4 side (for IOs handled by m4_rproc).

    See https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins

    https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration

    https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

    Regards.

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    1 reply

    PatrickFAnswer
    Technical Moderator
    September 10, 2021

    Hi,

    there is no need to declare 'unused' GPIOs, they are all by default assigned by the HW as Analog mode (See GPIOx_MODER in product Reference Manual), which is best for power consumption and noise.

    Then, using Device Tree you could map required IOs to peripheral functions or GPIO function (e.g. LEDs).

    Initialization of GPIO IP is done either on uBoot/Linux side (for IOs devoted to uBoot/Linux) or Cortex-M4 side (for IOs handled by m4_rproc).

    See https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins

    https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration

    https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

    Regards.

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'