public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Serial link problems
@ 2007-01-11  9:33 Guillaume Menant
  2007-01-11 11:12 ` Gary Thomas
  2007-01-11 18:17 ` Andrew Lunn
  0 siblings, 2 replies; 8+ messages in thread
From: Guillaume Menant @ 2007-01-11  9:33 UTC (permalink / raw)
  To: ecos-discuss

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?

Guillaume MENANT



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Serial link problems
  2007-01-11  9:33 [ECOS] Serial link problems Guillaume Menant
@ 2007-01-11 11:12 ` Gary Thomas
  2007-01-11 11:47   ` [ECOS] sntp problems Laurie Gellatly
  2007-01-12  8:58   ` [ECOS] RE : [ECOS] Serial link problems Guillaume Menant
  2007-01-11 18:17 ` Andrew Lunn
  1 sibling, 2 replies; 8+ messages in thread
From: Gary Thomas @ 2007-01-11 11:12 UTC (permalink / raw)
  To: Guillaume Menant; +Cc: ecos-discuss

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

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

* [ECOS] sntp problems
  2007-01-11 11:12 ` Gary Thomas
@ 2007-01-11 11:47   ` Laurie Gellatly
  2007-01-12  8:58   ` [ECOS] RE : [ECOS] Serial link problems Guillaume Menant
  1 sibling, 0 replies; 8+ messages in thread
From: Laurie Gellatly @ 2007-01-11 11:47 UTC (permalink / raw)
  To: ecos-discuss

Hi All,
Hope someone can help.
I'm trying to use SNTP and running into two problems using FreeBSD stack.
1) Although the output of show_bootp correctly shows the NTP server/s, when
the NTP thread tries to
get an update, the system hangs.

2) I don't see any allowance in the code for non UTC time zones.
I suspect this is also giving me problems.

Comments anyone?

Thanks			...Laurie:{)


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Serial link problems
  2007-01-11  9:33 [ECOS] Serial link problems Guillaume Menant
  2007-01-11 11:12 ` Gary Thomas
@ 2007-01-11 18:17 ` Andrew Lunn
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2007-01-11 18:17 UTC (permalink / raw)
  To: Guillaume Menant; +Cc: ecos-discuss

On Thu, Jan 11, 2007 at 10:33:08AM +0100, 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?

Are you running it a very high speed? Try at a slower speed and see if
it works better. You probably don't have any flow control, and redboot
is polled I/O, not interrupt driven. How big a receive hardware buffer
does the serial port hardware have? 

     Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] RE : [ECOS] Serial link problems
  2007-01-11 11:12 ` Gary Thomas
  2007-01-11 11:47   ` [ECOS] sntp problems Laurie Gellatly
@ 2007-01-12  8:58   ` Guillaume Menant
  2007-01-12 10:59     ` [ECOS] RE : " Guillaume Menant
  1 sibling, 1 reply; 8+ messages in thread
From: Guillaume Menant @ 2007-01-12  8:58 UTC (permalink / raw)
  To: ecos-discuss

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


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] RE : [ECOS] RE : [ECOS] Serial link problems
  2007-01-12  8:58   ` [ECOS] RE : [ECOS] Serial link problems Guillaume Menant
@ 2007-01-12 10:59     ` Guillaume Menant
  2007-01-12 12:14       ` Gary Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Guillaume Menant @ 2007-01-12 10:59 UTC (permalink / raw)
  To: ecos-discuss

I've resolved the problem by setting the baudrate to 9600 (a lower one)

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


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] RE : [ECOS] RE : [ECOS] Serial link problems
  2007-01-12 10:59     ` [ECOS] RE : " Guillaume Menant
@ 2007-01-12 12:14       ` Gary Thomas
  2007-01-12 12:21         ` [ECOS] RE : " Guillaume Menant
  0 siblings, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2007-01-12 12:14 UTC (permalink / raw)
  To: Guillaume Menant; +Cc: ecos-discuss

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

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

* [ECOS] RE : [ECOS] RE : [ECOS] RE : [ECOS] Serial link problems
  2007-01-12 12:14       ` Gary Thomas
@ 2007-01-12 12:21         ` Guillaume Menant
  0 siblings, 0 replies; 8+ messages in thread
From: Guillaume Menant @ 2007-01-12 12:21 UTC (permalink / raw)
  To: 'Gary Thomas'; +Cc: ecos-discuss

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

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

end of thread, other threads:[~2007-01-12 12:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11  9:33 [ECOS] Serial link problems Guillaume Menant
2007-01-11 11:12 ` Gary Thomas
2007-01-11 11:47   ` [ECOS] sntp problems Laurie Gellatly
2007-01-12  8:58   ` [ECOS] RE : [ECOS] Serial link problems Guillaume Menant
2007-01-12 10:59     ` [ECOS] RE : " Guillaume Menant
2007-01-12 12:14       ` Gary Thomas
2007-01-12 12:21         ` [ECOS] RE : " Guillaume Menant
2007-01-11 18:17 ` Andrew Lunn

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