Re: [UCLINUX] Re: [uCsimm] Interrupts & ColdFire

From: Tom Walsh (tom@cyberiansoftware.com)
Date: Fri Jun 30 2000 - 14:29:14 EDT


Olivier Bouyssou wrote:
>
> Greg Ungerer wrote:
> >
> > Hi Olivier,
> >
> > Olivier Bouyssou wrote:
> > > Thank you for your answer.
> > >
> > > Also, I insist because I do not have an interruption of free :
> > >
> > > - irq7 & irq4 for the st16c2550.
> > > - irq1 for a CS8900.
> > >
> > > I tried to modify the functions sti and cli in way to mask irq7 via
> > > register IMR or register FCR of the 16550.
> > >
> > > But now I obtain "spurious interrupts", because it happens sometimes that
> > > the core take into account the interruption during the instruction which
> > > clear the pending bit.
> > >
> > > I could call rs_interrupte when that arrives but it is not beautiful.
> > >
> > > I looked at serial.c and it seems to to me that it must be possible to share
> > > an interruption with some modifications. what do you think about it ?
> > >
> > > In this case the mofications hardware would be simpler...
> >
> > There is no formal support for sharing interrupts currently, but
> > technically
> > it should be pretty simple to do.
> >
> > Why does the stl16c2550 have 2 interrupts?
>
> Yes, I forgot to specify that the stl16c2550 is a double 16550A with two lines
> of interrupts.
>
> > I would suggest that these share the one IRQ line...
>
> Well... it does not remain any more which has to make a new pcb
> and to make a patch for serial.c.

Olivier,

        I agree with Greg, the interrupt outputs of that device should be Open
Collector, then you can wire-OR the pins (tie them together), program
the interrupt line to be Level Triggered (as opposed to Edge
Triggered). Write your interrupt handler to check for servicing of
Uart #1, if service needed, service it, then assume that all is finished
and RETI. If you leave without also servicing Uart #2, the Level state
of the interrupt line would pull you back into your ISR and this time
the Uart #2 would get serviced. What you would have to do is poll the
Interrupt Service Register of the Uart to see if it generate an IRQ, I
think that this is a bit in the second register set (e.g. 0x3f9)?

build it as:

        if (NeedServiceUart1 ()) {
                ServiceUart1 (); return;
 } else if (NeedServiceUart2 ()) {
                ServiceUart2 (); return;
        }

Regards,

TomW

>
> --
> Olivier Bouyssou (F1NXH), Paratronic olivier.bouyssou@wanadoo.fr
> 22 rue paul verlaine 31570 st Foy d'Aigrefeuille
> Tel : +33.5.62.18.81.82 Fax : +33.4.68.94.54.16

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
'www.openhardware.net', 'www.cyberiansoftware.com'
"Windows? No thanks, I have work to do..."
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:37 EST