cancel
Showing results for 
Search instead for 
Did you mean: 

About unused pin of STM32 microcontroller system memory boot mode

shimo
Associate II

I have a question about unused pin of STM32 microcontroller system memory boot mode.

Are all unused pins set as inputs(no-pullup,no-pulldown)?

3 REPLIES 3
KDJEM.1
ST Employee

Hello @shimo,

As already mentioned in Getting started with STM32G0 Series hardware development application note, to increase EMC performance and avoid extra power consumption, unused clocks, counters or I/Os, should not be left free. I/Os should be connected to a fixed logic level of 0 or 1 by an external or internal pull-up or pull-down on the unused I/O pin. The other option is to configure GPIO as output mode using software.

Also I think that the AN4899 Application note" STM32 microcontroller GPIO hardware settings and low-power consumption" can help you and precisely Avoid floating unused pin section and Configure unused GPIO input as analog input section.

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

The bootloader sets some of the pins (as given in AN26061) as input with pullup or pulldown, until it "sees" activity on the Rx pin, upon which it switches given interface's Tx pin to appropriately, as push-pull or open-drain or any other appropriate state.

Unfortunately, AN2606 does not deal in detail with this, so it's mostly upon you to find out. Try e.g. debugging the bootloader, stop it and look at GPIO registers.

Even more unfortunately, in 'G0, SPI_MISO pins are switched to hard push-pull even before any activity, see https://community.st.com/t5/stm32-mcu-products/what-are-boot-loader-reserved-pins-for-first-programming/m-p/581657 and @Kraal 's thread linked from there.

JW

 

PS. Kaouthar, I believe @shimo is asking about pin states in default bootloader.

@KDJEM.1 

Thank you for the information.
I'll ask stmicro directly about the details of unused pins.