Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 1997 18:18:14 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        mouth@ibm.net (John Kelly)
Cc:        msmith@atrad.adelaide.edu.au, freebsd@atipa.com, hackers@FreeBSD.ORG, terry@lambert.org
Subject:   Re: Sharing interrupts
Message-ID:  <199707300848.SAA21116@genesis.atrad.adelaide.edu.au>
In-Reply-To: <33e5c558.25976723@smtp-gw01.ny.us.ibm.net> from John Kelly at "Jul 30, 97 08:17:25 am"

next in thread | previous in thread | raw e-mail | index | archive | help
John Kelly stands accused of saying:
> On Wed, 30 Jul 1997 08:59:50 +0930 (CST),  Michael Smith wrote:
> 
> >I have no problems with you sharing the information
> 
> Good.  Here it is.  

I hope you don't mind some minor editorial comment.  8)

> Is this appropriate for the list?  Yes, because the man page for SIO
> says "Shared IRQs on different cards are not supported," and that
> statement is false.  The multiport support in FreeBSD is NOT the
> determining factor.

It would be if the search for interrupting devices worked "correctly".
Whilst there has been talk of this, it hasn't been changed.  The 
current "incorrect" behaviour is probably better.

> People often say that two or more serial cards with totem-pole or
> tri-stated outputs cannot ACTIVELY share an edge-triggered ISA
> interrupt.

"It is correct to say"

> Once the serial port is opened, either type of driver will
> hold the IRQ line to ground (logic low).  When the UART signals an
> interrupt, the driver gates a voltage onto the IRQ line, between 3.5
> to 4.5 volts (logic high).

... with CMOS devices this is typically a current source, not a
voltage source; the drain current-limit resistor is usually aroundthe
50 ohm mark (varies with logic family).  With little or no load as is
common for CMOS busses, this usually corresponds to very close to 5V.

> To signal an interrupt, one card will try to drive the line high while
> the other card is still holding it to ground.  Which one wins?  The
> one holding the line to ground, because TTL pulls low better than it
> pulls high.  So unless they both signal an interrupt at precisely the
> same instant, neither one will be able to tell the 8259 interrupt
> controller they need service.  This is why people say it won't work.

CMOS output stages are about as good pulling high as low; this often
runs you to about 2.5V.  Same difference, really.  See any current
NatSemi CMOS logic databook for details on the logic level change
implemented for most logic families a few years back.

> There will be a small voltage drop across the diode, about 0.5V.
> That should leave at least 2.9V on the IRQ line, giving a reasonable
> margin of noise immunity above the "logic high" minimum of 2.0V.

Vih for CMOS devices is 3V (60% of Vdd), Vil is 1.5V (30%).  I would
suspect that most ISA bus interfaces are more lenient however.

> Available at Radio Shack, 1N4001silicon diodes are ideal for this
> application because they have a minimal voltage drop.  If those are
> not in stock, substitute 1N4002 or others of the same family.  For
> our purposes, their higher peak inverse voltage will not matter.

I would avoid the use of silicon power diodes for this application;
they have a significant parasitic capacitance, and will generate a
substantial spike on the ICU input when your device signals an
interrupt.  They also have a long Toff (turnoff time), meaning that
when your device drives the interrupt output low you will generate
another spike and considerable ground noise.  They also have a very
_substantial_ voltage drop at low current, certainly not "minimal".

If you must use a large diode, use a "fast-recovery" type such as a
UF4001; ideally, you should be using a fast small-signal diode like
the (very cheap) BAT-47.  This device also has a much lower Vf(max),
around 0.4V, and very low parasitic capacitance.

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707300848.SAA21116>