* Floating inputs on unused GPIO pins
@ 2008-10-13 9:56 Laurent Pinchart
2008-10-13 10:03 ` Geert Uytterhoeven
2008-10-13 10:08 ` Leon Woestenberg
0 siblings, 2 replies; 10+ messages in thread
From: Laurent Pinchart @ 2008-10-13 9:56 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
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,
--
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 9:56 Floating inputs on unused GPIO pins Laurent Pinchart
@ 2008-10-13 10:03 ` Geert Uytterhoeven
2008-10-13 11:00 ` Laurent Pinchart
2008-10-13 10:08 ` Leon Woestenberg
1 sibling, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2008-10-13 10:03 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1214 bytes --]
On Mon, 13 Oct 2008, Laurent Pinchart wrote:
> 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: Geert.Uytterhoeven@sonycom.com
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 9:56 Floating inputs on unused GPIO pins Laurent Pinchart
2008-10-13 10:03 ` Geert Uytterhoeven
@ 2008-10-13 10:08 ` Leon Woestenberg
2008-10-13 11:04 ` Laurent Pinchart
1 sibling, 1 reply; 10+ messages in thread
From: Leon Woestenberg @ 2008-10-13 10:08 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
Hello Laurent,
On Mon, Oct 13, 2008 at 11:56 AM, Laurent Pinchart
<laurentp@cse-semaphore.com> wrote:
> 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,
--
Leon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 10:03 ` Geert Uytterhoeven
@ 2008-10-13 11:00 ` Laurent Pinchart
0 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2008-10-13 11:00 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]
Hi Geert,
On Monday 13 October 2008, Geert Uytterhoeven wrote:
> On Mon, 13 Oct 2008, Laurent Pinchart wrote:
> > 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.
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,
--
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 10:08 ` Leon Woestenberg
@ 2008-10-13 11:04 ` Laurent Pinchart
2008-10-13 11:44 ` Leon Woestenberg
2008-10-13 13:12 ` Bill Gatliff
0 siblings, 2 replies; 10+ messages in thread
From: Laurent Pinchart @ 2008-10-13 11:04 UTC (permalink / raw)
To: Leon Woestenberg; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
Hi Leon,
On Monday 13 October 2008, Leon Woestenberg wrote:
> Hello Laurent,
>
> On Mon, Oct 13, 2008 at 11:56 AM, Laurent Pinchart
> <laurentp@cse-semaphore.com> wrote:
> > 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.
> 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 ?
--
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 11:04 ` Laurent Pinchart
@ 2008-10-13 11:44 ` Leon Woestenberg
2008-10-13 13:12 ` Bill Gatliff
1 sibling, 0 replies; 10+ messages in thread
From: Leon Woestenberg @ 2008-10-13 11:44 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
Hi Laurent,
On Mon, Oct 13, 2008 at 1:04 PM, Laurent Pinchart
<laurentp@cse-semaphore.com> wrote:
> 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,
--
Leon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 11:04 ` Laurent Pinchart
2008-10-13 11:44 ` Leon Woestenberg
@ 2008-10-13 13:12 ` Bill Gatliff
2008-10-13 13:40 ` Leon Woestenberg
2008-10-14 11:07 ` [OT] " Gabriel Paubert
1 sibling, 2 replies; 10+ messages in thread
From: Bill Gatliff @ 2008-10-13 13:12 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
Laurent Pinchart wrote:
>
> 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.
--
Bill Gatliff
bgat@billgatliff.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 13:12 ` Bill Gatliff
@ 2008-10-13 13:40 ` Leon Woestenberg
2008-10-28 15:10 ` Laurent Pinchart
2008-10-14 11:07 ` [OT] " Gabriel Paubert
1 sibling, 1 reply; 10+ messages in thread
From: Leon Woestenberg @ 2008-10-13 13:40 UTC (permalink / raw)
To: Bill Gatliff; +Cc: linuxppc-dev
Hello Laurent,
On Mon, Oct 13, 2008 at 3:12 PM, Bill Gatliff <bgat@billgatliff.com> wrote:
> 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,
--
Leon
^ permalink raw reply [flat|nested] 10+ messages in thread
* [OT] Re: Floating inputs on unused GPIO pins
2008-10-13 13:12 ` Bill Gatliff
2008-10-13 13:40 ` Leon Woestenberg
@ 2008-10-14 11:07 ` Gabriel Paubert
1 sibling, 0 replies; 10+ messages in thread
From: Gabriel Paubert @ 2008-10-14 11:07 UTC (permalink / raw)
To: Bill Gatliff; +Cc: linuxppc-dev
[Marked off-topic because it is exclusively hardware related]
On Mon, Oct 13, 2008 at 08:12:02AM -0500, Bill Gatliff wrote:
> Laurent Pinchart wrote:
>
> >
> > 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).
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Floating inputs on unused GPIO pins
2008-10-13 13:40 ` Leon Woestenberg
@ 2008-10-28 15:10 ` Laurent Pinchart
0 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2008-10-28 15:10 UTC (permalink / raw)
To: Leon Woestenberg; +Cc: linuxppc-dev, Bill Gatliff
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
Hi Leon,
sorry for the late reply.
On Monday 13 October 2008, Leon Woestenberg wrote:
> Hello Laurent,
>
> On Mon, Oct 13, 2008 at 3:12 PM, Bill Gatliff <bgat@billgatliff.com> wrote:
> > 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 :-)
> 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.
--
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-10-28 15:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 9:56 Floating inputs on unused GPIO pins Laurent Pinchart
2008-10-13 10:03 ` Geert Uytterhoeven
2008-10-13 11:00 ` Laurent Pinchart
2008-10-13 10:08 ` Leon Woestenberg
2008-10-13 11:04 ` Laurent Pinchart
2008-10-13 11:44 ` Leon Woestenberg
2008-10-13 13:12 ` Bill Gatliff
2008-10-13 13:40 ` Leon Woestenberg
2008-10-28 15:10 ` Laurent Pinchart
2008-10-14 11:07 ` [OT] " Gabriel Paubert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).