[ECOS] RE : [ECOS] RE : [ECOS] RE : [ECOS] Serial link problems

Guillaume Menant g.menant@ayrtontechnology.com
Fri Jan 12 12:21:00 GMT 2007


Thanks but i'ts not crucial for my use. 9600 bauds is enough. It's just for
sending commands to RedBoot.

Guillaume MENANT

-----Message d'origine-----
De : Gary Thomas [mailto:gary@mlbassoc.com] 
Envoyé : vendredi 12 janvier 2007 13:14
À : Guillaume Menant
Cc : ecos-discuss@sources.redhat.com
Objet : Re: [ECOS] RE : [ECOS] RE : [ECOS] Serial link problems

Guillaume Menant wrote:
> I've resolved the problem by setting the baudrate to 9600 (a lower one)

Note: as Andrew pointed out, this problem is created by the fact that
RedBoot is a polled driver and your host may be sending characters faster
than it can handle them.  You might be able to get by with a faster speed,
e.g. 19200.

You also might look at how your serial driver handles [polled] timeouts.
RedBoot has a timeout mechanism which is only applied on the first character
of the command line.  If your serial driver's timeout support is poor (in
your HAL - I can't examine it), then this might also cause problems.

> 
> Thanks for your support.
> 
> Guillaume MENANT
> 
> -----Message d'origine-----
> De : ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Guillaume
> Menant
> Envoyé : vendredi 12 janvier 2007 09:58
> À : ecos-discuss@sources.redhat.com
> Objet : [ECOS] RE : [ECOS] Serial link problems
> 
> Thanks for your answer Gary.
> 
> I've understand the same thing but isn't it a driver problem? I'm
currently
> working at 38400 bauds no parity, no handshake 8 databits 1 stopbit. Like
> you suggest, I will try at a lower baudrate like 9600 for example.
> 
> I will give you some news when I tried this. 
> 
> Guillaume MENANT
> 
> -----Message d'origine-----
> De : ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Gary Thomas
> Envoyé : jeudi 11 janvier 2007 12:11
> À : Guillaume Menant
> Cc : ecos-discuss@sources.redhat.com
> Objet : Re: [ECOS] Serial link problems
> 
> Guillaume Menant wrote:
>> Hello,
>>
>> While using RedBoot on AT697 (LEON Sparc V8), I've encountered problems
>> using the serial link. It appears that the "_rb_gets_preloaded" function
>> miss few characters arriving on the serial link. For example, I send
> "help"
>> and RedBoot understands "hlp".
>>
>> I've tried to send this command with 2 different softwares: 
>>
>> - The first one send the 4 ascii characters one after the other followed
> by
>> the carriage return -> RedBoot don't understand the command every time.
>> - The second one sends each character as soon as the user hit a key on
the
>> keyboard (it's hyperterminal, included in windows XP) -> RedBoot
> understand
>> the command every time.
>>
>> What can I do to resolve this problem? Obviously, it comes from the
serial
>> driver included in RedBoot (in io.c), but what kind of modification have
I
>> to do to prevent it?
> 
> What you're seeing is a serial overflow, caused when characters
> come into RedBoot too quickly.  Your first case, all four characters
> will be sent back to back, in the second, they'll only be sent as
> fast as the person typing them.
> 
> Either run at a slower baud rate, or go with the one-character-at-a-time
> style of input.
> 


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


--
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 mailing list