This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: AT91 serial port usage
- To: harri dot siirtola at vtt dot fi
- Subject: Re: [ECOS] AT91 serial port usage
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Tue, 14 Aug 2001 16:26:57 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <3.0.32.20010814170938.0098c100@vttmail.vtt.fi>
harri.siirtola@vtt.fi wrote:
>
> >> Does this work with the latest AT91 port: having both AT91 serial ports
> >> interrupt driven and port 0 used as /dev/ttydiag at the same time? I try to
> >> configure with these checked:
> >
> >Should do. If it doesn't you'll have to say what happens! Preferably after
> >a bit of debugging.
>
> After some digging: if I enable "Debug I/O sub-system", I get the following:
> Init device '/dev/ser0'
> AT91 SERIAL init - dev: FFFD0000.2
> Set output buffer - buf: 2071A78 len: 128
> Set input buffer - buf: 2071AF8 len:
> 128½)+??'*Ù¥?*??½'*Ù½Í*ÉÅ?5)QåÅ?MI%1?¥¹¥Ñ?
> µ?'*Ùé?ÿFFFCC000.3
> Set output buffer - buf: 2071B78 len: 128
> Set input buffer - buf: 2071BF8 len: 128
> Init device '/dev/ttydiag'
> Init tty channel: 206024C
> Init device '/dev/haldiag'
> HAL/diag SERIAL init
>
> So there's garbage instead of "Init device /dev/ser1" etc. After this,
> printf works though. Should there be a delay between inits?
It's the PLLs resyncing even though the baud rate hasn't actually changed.
A delay may not necessarily help as it may need traffic to sync properly.
You could try it though.
> Another problem is, I can't seem to get port 1 rx interrupts triggering (tx
> works ok). With my own experimental port (derived from Carl's port just as
> this one)
This port wasn't derived from Carl's.
> it triggered, I just can't find any significant differences.
> Chars appear in USART1_RHR and IMR bits 0 & 1 are set.
Don't know. Can't see any reason why not, like you. If nothing else -
there's no difference between the driver for ports 0 and 1 except obviously
the base address and interrupt number; nothing specific to port 1.
The only oddities I see are:
- start_xmit and stop_xmit both write the same thing to the IER which seems
curious, but possible
- the ISR doesn't OR in CYG_ISR_HANDLED
I wouldn't think this would cause what you see though.
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