This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Help with Interrupt driven Serial ports in EB40A


Hi,
   Thanks for the reply. That helps. I want it
Interrupt driven as I want to do some other work when
there is no data from the serial port. So can I have 2
threads, one for reading from the serial port and the
other doing some other work? Won't the read call in 
the first thread block the entire execution?
Can you please help me on this.

Thank you.

Saranyan/

--- Robert Cragie <rcc@jennic.com> wrote:
> Firstly, please note I have not used the EB40A HAL
> and am therefore only
> speaking regarding my experience with other similar
> HAL portings.
> 
> I think all you have to do is to enable the device
> drivers for the serial
> ports in your configuration. They are interrupt
> driven by default and will
> thus provide blocking read/write functions as
> opposed to the diagnostic
> serial drivers which do not use interrupts. Opening
> the drivers should do
> all the work for you by installing the correct
> ISR/DSR etc.
> 
> If you want to do GDB mangling on one of the ports,
> this is slightly
> different. This is something to do with the 'virtual
> vectors' and I have had
> a quick look at these to know that they are not for
> the faint-hearted!
> 
> Sorry I can't be of much more help but I do know you
> will probably not have
> to write your own interrupt handling for the UARTs
> if you can clearly see
> ISR and DSRs in the code.
> 
> Robert Cragie, Design Engineer
>
_______________________________________________________________
> Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
> http://www.jennic.com  Tel: +44 (0) 114 281 2655
>
_______________________________________________________________
> 
> > -----Original Message-----
> > From: ecos-discuss-owner@ecos.sourceware.org
> > [mailto:ecos-discuss-owner@ecos.sourceware.org]On
> Behalf Of Giri Raja
> > Sent: 02 April 2004 17:45
> > To: ecos-discuss@ecos.sourceware.org
> > Subject: [ECOS] Help with Interrupt driven Serial
> ports in EB40A
> >
> >
> > Hi,
> >    I'm trying to write a small application, which
> > would accept data from /dev/ttyS0 and convey it
> via a
> > GDB session from /dev/ttyS1.
> > I want the reception of data from /dev/ttyS0 to be
> > interrupt driven. Should I then create a interrupt
> > using cyg_drv_interrupt_create with the USART0
> > interrupt vector? And should I also create my own
> ISR
> > and DSR, then use the device handle to read and
> wirte?
> > I'm confused because I saw an implementation of
> the
> > serial drivers' ISR and DSR implementation in
> > at91_serial.c located under
> > ecos/packages/devs/serial/arm/at91/current/src
> >
> > Shall I just ignore it and just include
> > <cyg/hal/drv_api.h> .
> >
> > Your response would be very helpful.
> >
> > Thank you in advance.
> >
> > Giri.
> >
> > p.s: This is a repost, I'm desperately seeking for
> > help. Thank you for your patience.
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business $15K Web Design Giveaway
> > http://promotions.yahoo.com/design_giveaway/
> >
> > --
> > Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> > and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> >
> >
> 


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]