public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gthomas@redhat.com>
To: Dave Airlie <airlied@parthus.com>
Cc: aeb@arm.com, ecos-discuss@sourceware.cygnus.com,
	Andreas.Karlsson@combitechsystems.com
Subject: Re: [ECOS] UART communication
Date: Tue, 05 Sep 2000 09:03:00 -0000	[thread overview]
Message-ID: <XFMail.20000905100257.gthomas@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0009051657410.17347-100000@platinum.limerick.sslinc.com>

You might try the [untested] attached patch.  No guarantees, but it
will give you an idea of where to look and what to try.

Of course if you get it working, we'd appreciate any feedback/patches.

On 05-Sep-2000 Dave Airlie wrote:
> 
> With eCos on the ARM AEB you cannot choose 57600, I up came against
> something similiar a while back.. check the return from
> cyg_io_set_config I found it by tracing the code ...
> 
> I think you can use a different clock multiplier to get 57600 but it
> involves changing eCos code...
> 
> Dave.
> 
> 
> On Tue, 5 Sep 2000 Andreas.Karlsson@combitechsystems.com wrote:
> 
>> Hi,
>> 
>> While receiving several bytes on the UART0 port on my AEB-board the
>> eCos-serialdriver says it only received 1 byte with the value of 0.
>> 
>> The incoming data looks very nice on an oscilloscope. 
>> 
>> Just to be sure that I hadn't messed something up in my receiver-thread I
>> connected the TX and the RX pin and sent 4 bytes, the packet was received
>> just as it should.
>> 
>> 
>> 
>> I compiled the ser0 with a baud rate of 57600 since that's the only one I
>> can use. The other settings are 1 stop bit, no parity, wordsize=8 and
>> CTS/RTS enabled.
>> 
>> I noticed that the baudrate of 57600 wasn't supported in aeb_serial.h but
>> what happens when I make this selection in the configuration?
>> 
>> To be able to enable CTS/RTS I had to modify the select_baud-array in
>> aeb_serial.h. This because I should be able to set all fields in the
>> cyg_serial_info_t struct. I added the value of 26 on the bauddivisor for
>> 57600, maybe this is the problem.
>> 
>> I really don't know what could be wrong so if anybody has a clue...
>> 
>> /Andreas
>> 
> 
> -- 
>       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
> 

============= Patch to support 57600 and 115200 baud on AEB-1 ================
Index: devs/serial/arm/aeb/current/src/aeb_serial.h
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/devs/serial/arm/aeb/current/src/aeb_serial.h,v
retrieving revision 1.1
diff -u -5 -p -r1.1 aeb_serial.h
--- devs/serial/arm/aeb/current/src/aeb_serial.h        2000/04/10 14:44:46     1.1
+++ devs/serial/arm/aeb/current/src/aeb_serial.h        2000/09/05 15:59:29
@@ -144,11 +144,11 @@ static unsigned short select_baud[] = {
         69*3,  // 7200
         52*3,  // 9600
     (69*3)/2,  // 14400
         26*3,  // 19200
         13*3,  // 38400
-           0,  // 57600
-           0,  // 115200
+          26,  // 57600
+          13,  // 115200
            0,  // 230400
 };
 
 #endif // CYGONCE_ARM_AEB_SERIAL_H


  reply	other threads:[~2000-09-05  9:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-05  6:16 Andreas.Karlsson
2000-09-05  8:52 ` Dave Airlie
2000-09-05  9:03   ` Gary Thomas [this message]
2000-09-05  9:04 ` Jonathan Larmour
2000-09-05 22:32 Andreas.Karlsson
2000-09-06 10:01 ` Jonathan Larmour
2000-09-07  0:25   ` Jesper Skov
2000-09-06 10:21 Andreas.Karlsson
2000-09-06 10:31 ` Jonathan Larmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20000905100257.gthomas@redhat.com \
    --to=gthomas@redhat.com \
    --cc=Andreas.Karlsson@combitechsystems.com \
    --cc=aeb@arm.com \
    --cc=airlied@parthus.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).