cancel
Showing results for 
Search instead for 
Did you mean: 

How do i deal with unused pins of this part number STM32F103R8T6 MCU

Bhat
Associate II

Dear forum,

I am using ST STM32F103R8T6 MCU for my medical project, i referred the hardware design guide to design the MCU schematics, now i have question in my mind that how do i deal with unused pins?

should i connect 10K resistor to ground? or

should i directly connect unused pins to ground?

i am attaching the guide which i used to design the schematics.

in this guide i did not find any statement which says how to deal with unused pins.

please help me out.

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

I suppose we should start with what you should not do. You should not leave them as digital inputs with nothing connected to them. This is because a digital input that happens to float some way between the supply lines will waste power in the digital input circuit. And wasting power is bad (ok it's not very bad in the sense that it won't catch fire, but if it is battery-powered, the battery will run out more quickly than otherwise).

So what might you do?

Program unused pins to be

  • analog inputs
  • digital inputs that you tie high or low externally directly (this was bad practice in the days of LS TTL because the input circuit was not designed to cope, and will quickly flatten the battery if you accidentally reprogram the pin as a digital output of the opposite polarity).
  • digital inputs that you tie high or low externally via a resistor (costs an extra resistor)
  • digital inputs with internal pull-up or pull-down resistor
  • digital outputs either high or low

I like to have some pins as digital inputs with internal pull-up. This way the same code might detect it has been put on a different pcb or has extra hardware attached if that pin is sometimes externally tied to Vss.

And other spare pins as digital outputs, that I can monitor for debugging / status purposes. Maybe even hang an LED through a resistor off here on prototype boards.

It's your choice, and there's little to choose between the "good" options.

Hope this helps,

Danish

View solution in original post

3 REPLIES 3
Danish1
Lead II

I suppose we should start with what you should not do. You should not leave them as digital inputs with nothing connected to them. This is because a digital input that happens to float some way between the supply lines will waste power in the digital input circuit. And wasting power is bad (ok it's not very bad in the sense that it won't catch fire, but if it is battery-powered, the battery will run out more quickly than otherwise).

So what might you do?

Program unused pins to be

  • analog inputs
  • digital inputs that you tie high or low externally directly (this was bad practice in the days of LS TTL because the input circuit was not designed to cope, and will quickly flatten the battery if you accidentally reprogram the pin as a digital output of the opposite polarity).
  • digital inputs that you tie high or low externally via a resistor (costs an extra resistor)
  • digital inputs with internal pull-up or pull-down resistor
  • digital outputs either high or low

I like to have some pins as digital inputs with internal pull-up. This way the same code might detect it has been put on a different pcb or has extra hardware attached if that pin is sometimes externally tied to Vss.

And other spare pins as digital outputs, that I can monitor for debugging / status purposes. Maybe even hang an LED through a resistor off here on prototype boards.

It's your choice, and there's little to choose between the "good" options.

Hope this helps,

Danish

Dear Danish,

Thank you for your reply.

Amel NASRI
ST Employee

Hi @Bhat​ ,

Please have a look to AN4899.

-Amel

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.