This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: EB40A (AT91) serial port oddness
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Tom Lynn <tom dot lynn at hypertag dot com>
- Cc: ecos-discuss <ecos-discuss at sources dot redhat dot com>
- Date: 30 Sep 2004 10:07:36 +0100
- Subject: Re: [ECOS] EB40A (AT91) serial port oddness
- References: <415AE2BC.2090009@hypertag.com>
Tom Lynn <tom.lynn@hypertag.com> writes:
> I'm getting some weird behaviour on an EB40A (AT91) serial port.
> With the code below, which just tries to emit the 65 byte string
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=\n",
> I'm reading bytes such as:
>
> ...
> 'UVWXYZabcdefghij'
> 'klmnopqrstuvwxyz'
> '0123456789-=\nBCD'
> 'EFGHIJKLMNOPQRST'
> 'UVWXYZabcdefghij'
> 'klmnopqrstuvwxyz'
> '0123456789-=\n\t\r\x11'
> '\x15\x19\x1d!%)-159=AEIMQ'
> 'UY]aei\x85\x89\x8d\x91\x95\x99\x9d\xa1\xa5\xa9'
> '\xad\xb1\xb5\xb9\xbd\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5\xe9'
> '\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5\xb5\xf5)\xff\t\r'
> '\x11\x15\x19\x1d!%)-159=AEIM'
> 'QUY]aei\x85\x89\x8d\x91\x95\x99\x9d\xa1\xa5'
> '\xa9\xad\xb1\xb5\xb9\xbd\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5'
> '\xe9\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5\xb5\xf5)\xff\t'
> '\r\x11\x15\x19\x1d!%)-159=AEI'
> 'MQUY]aei\x85\x89\x8d\x91\x95\x99\x9d\xa1'
> '\xa5\xa9\xad\xb1\xb5\xb9\xbd\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1'
> '\xe5\xe9\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5\xb5\xf5)\xff'
> 'BCDEFGHIJKLMNOPQ'
> 'RSTUVWXYZabcdefg'
> 'hijklmnopqrstuvw'
> 'xyz0123456789-=\n'
> '\t\r\x11\x15\x19\x1d!%)-159=AE'
> 'IMQUY]aei\x85\x89\x8d\x91\x95\x99\x9d'
> '\xa1\xa5\xa9\xad\xb1\xb5\xb9\xbd\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd'
> '\xe1\xe5\xe9\xc1\xc5\xc9\xcd\xd1\xd5\xd9\xdd\xe1\xe5\xb5\xf5)'
> '\xffBCDEFGHIJKLMNOP'
> 'QRSTUVWXYZabcdef'
> ...
>
> The AEIMQUY suggests jumps of 4, and the intermittent almost-
> correct output (the 'A' is always missing) together make me think
> that it's the debugging connection (running at 38400, i.e. 9600*4)
> that's causing the problem. I've played with all the switches I
> can find and can't turn the damn thing off though. Any ideas?
When your application is running, there will be no traffic on the
debug channel. So there should be no interference from that, so long
as you are not doing diag_printf()s. The 4 byte jumps are suspicious,
I agree, but you get contiguous runs too, so the problem is
intermittent.
The AT91 serial devices are nasty and a lot of work has gone in to
making them perform correctly. However, that was mostly on the receive
side. Transmission should be much simpler. I've run a variety of
serial tests on the AT91's in the past, some of which test high
throughput, with no difficulties.
Make sure you have the very latest version of the cvs repository.
What are you using to recieve the characters at the other end? minicom
on Linux or HyperTerminal on Windows are known to work well.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss