This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Serial device driver problem.
- To: "Dennis Ehlin (ECS)" <Dennis dot Ehlin at ecs dot ericsson dot se>
- Subject: Re: [ECOS] Serial device driver problem.
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 30 May 2001 16:31:27 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <2310E22AE31BD51189DB00A0C9DF89F85A27E3@eseklnt101.kl.sw.ericsson.se>
"Dennis Ehlin (ECS)" wrote:
>
> >>
> >> When i do a serial_read (located serial.c) everything seems to work ok, and i get to the
> >> cyg_drv_cond_wait(&cbuf->wait) line and it stops there to wait for the cbuf->wait signal. ok.
> >>
> >> Then i generate a serial receive interrupt and the serial_rcv_char function is called,
> >> which sends the cbuf->wait signal with the line cyg_drv_cond_signal(&cbuf->wait).
> >>
> >> But nothing happends?, the cyg_drv_cond_wait(&cbuf->wait) never continues, as if it never gets the
> >> signal.
> >
> >Perhaps it did get the signal but hasn't read all the bytes requested (the
> >*len argument).
>
> Sounds unlikely, It's setup to receive only 1 byte, and i have a printout just after
> the cyg_drv_cond_wait(&cbuf->wait) line, and it never gets executed.
Then I suggest debugging the signal. When you reach
Cyg_Condition_Variable::signal() check that it is waking the correct
thread.
For sanity, I recommend rebuilding without optimization so that it's easier
to debug.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine