Skip to contentSkip to conversation

Floating inputs on unused GPIO pins

DISCUSSION Laurent Pinchart 5 participants 10 messages Oct 13, 2008 – Oct 28, 2008

lore
Share & tools
lore
#0 lore raw

Hi everybody,

our hardware engineer asked me to make sure all unused GPIO pins are configured as outputs to avoid floating inputs. He got theory on his side (floating inputs can lead to higher current consumption, metastability or even permanent damage), but I'd like to ask the list for practical feedback.

I haven't been able to find any mention of floating input protection in the MPC8248 documents. Has anyone here experienced issues with floating inputs in real-life designs ? Do you setup your board with all unused GPIO pins configured as outputs ?

Best regards,

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#1 lore raw
Quoted 3 lines · Laurent Pinchart

our hardware engineer asked me to make sure all unused GPIO pins are configured as outputs to avoid floating inputs. He got theory on his side (floating inputs can lead to higher current consumption, metastability or even permanent damage), but I'd like to ask the list for practical feedback.

I haven't been able to find any mention of floating input protection in the MPC8248 documents. Has anyone here experienced issues with floating inputs in real-life designs ? Do you setup your board with all unused GPIO pins configured as outputs ?

I always thought configurable GPIO pins default to _inputs_ after power-on, so it's safe to tie them to VCC through a pull-up resistor?
For CMOS, you can tie them to VDD or GND without a resistor.

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   [email protected]
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

#2 lore raw

Hi Geert,

Quoted 7 lines · Geert Uytterhoeven
Quoted 6 lines · Laurent Pinchart

our hardware engineer asked me to make sure all unused GPIO pins are configured as outputs to avoid floating inputs. He got theory on his side (floating inputs can lead to higher current consumption, metastability or even permanent damage), but I'd like to ask the list for practical feedback.

Quoted 8 lines
Quoted 4 lines

I haven't been able to find any mention of floating input protection in the MPC8248 documents. Has anyone here experienced issues with floating inputs in real-life designs ? Do you setup your board with all unused GPIO pins configured as outputs ?

I always thought configurable GPIO pins default to _inputs_ after power-on, so it's safe to tie them to VCC through a pull-up resistor?
For CMOS, you can tie them to VDD or GND without a resistor.

That's not really an option. The GPIO pins are connected to an optional expansion module. When the module is plugged in the pins have dedicated functions. When the module is not present they are by default floating inputs. That's the case our hardware engineer is concerned about.

Best regards,

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#3 lore raw
In reply to Laurent Pinchart

Hello Laurent,

Quoted 2 lines · Laurent Pinchart

our hardware engineer asked me to make sure all unused GPIO pins are configured as outputs to avoid floating inputs. He got theory on his side (floating inputs can lead to higher current consumption, metastability or even permanent damage), but I'd like to ask the list for practical feedback.

Ideally, configure them as inputs or tri-state (both mean high impedance), and do use pull-down or -up resistors.

Now, the answer might be different when your pins are not connected. Check on the processor if internal pull resistors are present. If so, use as input. If not, then your h/w engineer *may* have a point, not sure on that though.

Regards,

Signature · 1 line
Leon
#4 lore raw

Hi Leon,

Quoted 4 lines · Leon Woestenberg

Hello Laurent,

On Mon, Oct 13, 2008 at 11:56 AM, Laurent Pinchart <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines

our hardware engineer asked me to make sure all unused GPIO pins are configured as outputs to avoid floating inputs. He got theory on his side (floating inputs can lead to higher current consumption, metastability or even permanent damage), but I'd like to ask the list for practical feedback.

Ideally, configure them as inputs or tri-state (both mean high impedance), and do use pull-down or -up resistors.

As I explained in my mail to Geert, that's not really an option. The GPIO pins are connected to an optional expansion module. When the module is plugged in the pins have dedicated functions. When the module is not present they are by default floating inputs. That's the case our hardware engineer is concerned about.

Quoted 4 lines

Now, the answer might be different when your pins are not connected. Check on the processor if internal pull resistors are present. If so, use as input. If not, then your h/w engineer *may* have a point, not sure on that though.

There are no internal pull-up or pull-down resistors on the MPC8248 GPIO pins. I know our hardware engineer has a valid point theoretically. Does the point stand practically, or does the MPC8248 "state-of-the-art"(tm)(c)(whatever) technology make floating inputs safe ?

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#5 lore raw

Hi Laurent,

Quoted 2 lines · Laurent Pinchart

There are no internal pull-up or pull-down resistors on the MPC8248 GPIO pins. I know our hardware engineer has a valid point theoretically. Does the point stand practically, or does the MPC8248 "state-of-the-art"(tm)(c)(whatever) technology make floating inputs safe ?

Ask Freescale?

Regards,

Signature · 1 line
Leon
#6 lore raw
In reply to Laurent Pinchart
Quoted 2 lines · Laurent Pinchart

There are no internal pull-up or pull-down resistors on the MPC8248 GPIO pins. I know our hardware engineer has a valid point theoretically. Does the point stand practically, or does the MPC8248 "state-of-the-art"(tm)(c)(whatever) technology make floating inputs safe ?

Well, Freescale's own layout recommendations recommend pullups or pulldowns for all input pins, but it's isn't clear what motivates that suggestion.

The block diagram, Figure 37-21, is less than helpful. :) I recall a doc somewhere that showed the input protection circuitry ends up providing a modest pullup/down, so the line never truly "floats". But it's a very high-impedance path, and I can't seem to find the doc anyway so it could be for a completely different chip altogether.

The part isn't going to blow up if you leave inputs unconnected, at least if you avoid high-EMI/RFI environments. But I can imagine the possibility of increased power consumption if I try hard enough. I would think that the magnitude would be completely swamped by the consumption of the rest of the chip, however...

The technical answer might not be the best political one, at least not without Freescale-branded docs to back you up. I say, write the code and make everyone else happy. :)

At least until someone plugs in that expansion module!

b.g.

Signature · 2 lines
Bill Gatliff
[email protected]
#7 lore raw

Hello Laurent,

Quoted 2 lines · Bill Gatliff

At least until someone plugs in that expansion module!

Bill's remark made a neuron connection in my head:

Can you detect if the module is inserted or not? (By reading a known state of some pin)?

You could then configure the pins dynamically in your driver.

Regards,

Signature · 1 line
Leon
#8 lore raw

Hi Leon,

sorry for the late reply.

Quoted 9 lines · Leon Woestenberg

Hello Laurent,

Quoted 2 lines · Bill Gatliff

At least until someone plugs in that expansion module!

Bill's remark made a neuron connection in my head:

Can you detect if the module is inserted or not? (By reading a known state of some pin)?

I can, although it's a bit more complex than that. The module is connected to the main board I2C bus so I can detect its presence by checking if chips connected to the bus are detected. Using a GPIO would have been much easier, but that's life :-)

Quoted 1 line

You could then configure the pins dynamically in your driver.

That's what I'm doing. As dynamic pin configuration requires board-specific knowledge in the device driver I would have liked to avoid that if possible.

Best regards, and thanks for your help.

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#9 lore raw
In reply to Bill Gatliff

[Marked off-topic because it is exclusively hardware related]

Quoted 11 lines · Bill Gatliff
Quoted 2 lines · Laurent Pinchart

There are no internal pull-up or pull-down resistors on the MPC8248 GPIO pins. I know our hardware engineer has a valid point theoretically. Does the point stand practically, or does the MPC8248 "state-of-the-art"(tm)(c)(whatever) technology make floating inputs safe ?

Well, Freescale's own layout recommendations recommend pullups or pulldowns for all input pins, but it's isn't clear what motivates that suggestion.

The block diagram, Figure 37-21, is less than helpful. :) I recall a doc somewhere that showed the input protection circuitry ends up providing a modest pullup/down, so the line never truly "floats".

It's most of the time a couple of reverse biased diodes, one pulling to the ground and the other to the I/O supply for that pin (there may be several differnt I/O voltages in addition to a core voltage but I digress). This prevents the input from going outside the ground to I/O supply range (plus/minus diode threshholds) but can be considered as essentially free floating inside that range.

The input may well end up floating at mid-level turning on both transistors of the input gate (actually if the diodes are well matched, it will, but don't try to measure it with a voltmeter).

Quoted 1 line

But it's a very high-impedance path,

True and that's why it cannot be depended upon. The DC voltage (not taking into account pickup to which it will be very sensitive) and the impedance will depend on several internal (diode characteristics and matching), ambient (temperature) and external factors (resistive pick up through sub pA level surface currents from neighboring pins/tracks). Especially the effective impedance of the diode drops very rapidly with temperature (or if you prefer their leakage current increases with increasing temperature). This makes the circuit much more sensitive to AC pickup at very low temperatures.

In this case the only sane solution is, unfortunately, adding external pullup and or pulldown resistors. The resistor value can be high (47k to 1M) to limit current waste when the signal does not have the default value. If you expect most of your signals to be low most of the time, use pull-down resistors, else use pull-ups (or select on a signal by signal basis if you can afford it, but this rule does not apply to the GPIO pin used as a presence detect if there is one).

Regards,
Gabriel