[ECOS] Help with Interrupt driven Serial ports in EB40A
Sat Apr 3 04:42:00 GMT 2004
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.
--- Robert Cragie <firstname.lastname@example.org> 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: email@example.com
> > [mailto:firstname.lastname@example.org]On
> Behalf Of Giri Raja
> > Sent: 02 April 2004 17:45
> > To: email@example.com
> > 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
> > and DSR, then use the device handle to read and
> > I'm confused because I saw an implementation of
> > 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:
> > and search the list archive:
Do you Yahoo!?
Yahoo! Small Business $15K Web 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
More information about the Ecos-discuss