public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Serial device driver problem.
@ 2001-05-29  6:52 Dennis Ehlin (ECS)
  2001-05-29 10:11 ` Jonathan Larmour
  2001-05-30  2:55 ` David Airlie
  0 siblings, 2 replies; 5+ messages in thread
From: Dennis Ehlin (ECS) @ 2001-05-29  6:52 UTC (permalink / raw)
  To: ecos-discuss

Hi,
 
I'm trying write a serial device to my ppc target, i'm using the generic 16x5x uart code.
I have the serial interrupts working and so on...
 
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.
 
I suppose there's alot of things that can go wrong, but I dont have a clue of what is happening there.
Does anyone know of something that could cause this ?
 
(I use the serial_echo test to test this)
 
//Dennis
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Serial device driver problem.
  2001-05-29  6:52 [ECOS] Serial device driver problem Dennis Ehlin (ECS)
@ 2001-05-29 10:11 ` Jonathan Larmour
  2001-05-30  2:55 ` David Airlie
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-05-29 10:11 UTC (permalink / raw)
  To: Dennis Ehlin (ECS); +Cc: ecos-discuss

"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).

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Serial device driver problem.
  2001-05-29  6:52 [ECOS] Serial device driver problem Dennis Ehlin (ECS)
  2001-05-29 10:11 ` Jonathan Larmour
@ 2001-05-30  2:55 ` David Airlie
  1 sibling, 0 replies; 5+ messages in thread
From: David Airlie @ 2001-05-30  2:55 UTC (permalink / raw)
  To: Dennis Ehlin (ECS); +Cc: ecos-discuss

are you sure you are (or the 16x5x) is clearing the interrupt correctly on
your target? if not you will exit the ISR, enter the DSR, exit the DSR
enter the ISR... and never go back to the scheduler..

Dave.

On Tue, 29 May 2001, Dennis Ehlin (ECS) wrote:

> Hi,
>  
> I'm trying write a serial device to my ppc target, i'm using the generic 16x5x uart code.
> I have the serial interrupts working and so on...
>  
> 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.
>  
> I suppose there's alot of things that can go wrong, but I dont have a clue of what is happening there.
> Does anyone know of something that could cause this ?
>  
> (I use the serial_echo test to test this)
>  
> //Dennis
>  
> 

-- 
      David Airlie, Software Engineer, Parthus Technologies plc.,
       Mary Rosse Centre, National Tech Park, Limerick, Ireland.
   t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Serial device driver problem.
  2001-05-29 23:21 Dennis Ehlin (ECS)
@ 2001-05-30  8:31 ` Jonathan Larmour
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-05-30  8:31 UTC (permalink / raw)
  To: Dennis Ehlin (ECS); +Cc: ecos-discuss

"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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [ECOS] Serial device driver problem.
@ 2001-05-29 23:21 Dennis Ehlin (ECS)
  2001-05-30  8:31 ` Jonathan Larmour
  0 siblings, 1 reply; 5+ messages in thread
From: Dennis Ehlin (ECS) @ 2001-05-29 23:21 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: ecos-discuss

>> 
>> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-30  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29  6:52 [ECOS] Serial device driver problem Dennis Ehlin (ECS)
2001-05-29 10:11 ` Jonathan Larmour
2001-05-30  2:55 ` David Airlie
2001-05-29 23:21 Dennis Ehlin (ECS)
2001-05-30  8:31 ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).