Skip to main content
Visitor II
February 9, 2023
Solved

Is the possible to internally connect two GPIO pins together?

  • February 9, 2023
  • 3 replies
  • 2826 views

Hi,

I am wondering if it is possible to internally connect two GPIO pins by software, not using wires.

Thank you

    This topic has been closed for replies.
    Best answer by Jean-Marc S

    Hi @Community member​ 

    no it is not possible

    3 replies

    ST Employee
    February 10, 2023

    GPIO's are connected either to internal registers (independant of each others) or to internal IP blocks (UART, I2C,etc..) through an internal multiplexer ("AF" Alternate Function Mux) or to some analog IP blocks (ADC, ..) through "Addtional Function" muxing.

    It is not possible to connect physically two GPIO on the device.

    So toggling 2 GPIO in the samew way you may have to write on 1st GPIO output register then write same data on the 2nd GPIO.

    However if your intention is to output the same "Alternate function" signal (ex: UART) to 2 GPIOs at the same time, this is possible:

    you can find this on the web:

    https://electronics.stackexchange.com/questions/86616/what-happens-on-the-stm32-when-two-pins-are-configured-to-have-the-same-alternat

    JM

    dchenAuthor
    Visitor II
    February 10, 2023

    Thank you @Jean-Marc S​ 

    To clarify my question, is it possible to set one pin as UART TX and the other as UART RX. Then able to connect them internally without a wire? I guess the answer is no though

    Super User
    February 10, 2023

    Did you find such a pin that supports both on your chip, and which one?

    hth

    KnarfB

    dchenAuthor
    Visitor II
    February 10, 2023

    No I didn't find such register that can handle loopback, which is a register in my previous MPU. That' why I want to confirm in the community.

    ST Employee
    February 10, 2023

    Hi @Community member​ 

    no it is not possible