Skip to main content
Explorer
August 14, 2023
Solved

Recommended course of action for Unused pin of STM32 MCU

  • August 14, 2023
  • 4 replies
  • 16728 views

Dear ST Community members

I am currently designing a PCB and utilizing the STM32G473VET6 MCU. I have noticed that there are several unused pins. Should I leave these pins unconnected or is there a recommended course of action for dealing with them?

thanks and regards

Neeraj

    This topic has been closed for replies.
    Best answer by KDJEM.1

    Hello @Neeraj and welcome to the Community :),

    Do not leave unused pin floating. You can connect these unused pins to ground or to supply on the PCB, or use PU / PD.

    The unused I/O pins should be configured as analog input by software; they should also be connected to a
    fixed logic level 0 or 1 by an external or internal pull-up or pull-down.

    For more explanation I advise you to refer to Getting started with STM32G4 Series hardware development boards application note. 

    As already mentioned by @KnarfB the AN4899 Application note" STM32 microcontroller GPIO hardware settings and low-power consumption" can help you and precisely Avoid floating unused pin section.

    I hope this help you!

    Kaouthar

    4 replies

    Super User
    August 14, 2023

    AN4899 Application note" STM32 microcontroller GPIO hardware settings and low-power consumption" is your friend.

    hth

    KnarfB

    NeerajAuthor
    Explorer
    August 14, 2023

    Hi @KnarfB 

    Is it possible to connect unused pins to ground or VCC without a pull-up/down resistor?

    Super User
    August 14, 2023

    Well, I won't take any responsibility for your design. @KDJEM.1 has pointed you to more reading. Keep in mind that the empty check on a virgin device may push or pull pins in unwanted directions as discussed here https://community.st.com/t5/stm32-mcus/empty-check-mechanism-on-stm32/ta-p/49369

    hth

    KnarfB

    KDJEM.1Answer
    Technical Moderator
    August 14, 2023

    Hello @Neeraj and welcome to the Community :),

    Do not leave unused pin floating. You can connect these unused pins to ground or to supply on the PCB, or use PU / PD.

    The unused I/O pins should be configured as analog input by software; they should also be connected to a
    fixed logic level 0 or 1 by an external or internal pull-up or pull-down.

    For more explanation I advise you to refer to Getting started with STM32G4 Series hardware development boards application note. 

    As already mentioned by @KnarfB the AN4899 Application note" STM32 microcontroller GPIO hardware settings and low-power consumption" can help you and precisely Avoid floating unused pin section.

    I hope this help you!

    Kaouthar

    Explorer
    October 4, 2023

    Hi @KDJEM.1 ,

    The AN4899 application note section "Avoid floating unused pin" also recommends setting the pin as PP output driven low for ESD concerns.

    -So generally we should always set unused GPIO to analog input and Pull Down and that should be okay for noise?

    -And if we are concerned about ESD we switch to the PP output?

    Technical Moderator
    October 4, 2023

    Hello @MVeen.1 ,

    Noise on non-connected input pin is a source of extra consumption by making the input buffer switch randomly. So, it is recommended to connect unused pins either to ground or to supply on the PCB, or use PU / PD. If the application is sensitive to ESD, prefer a connection to ground or define the pin as PP output and drive it to low.

    Thank you.

    Kaouthar

    Super User
    August 14, 2023

    Make sure you don't tie pins needed for programming to ground. If you're using the system bootloader, make sure you don't tie things to ground that it needs to function.