public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] UART communication
@ 2000-09-05  6:16 Andreas.Karlsson
  2000-09-05  8:52 ` Dave Airlie
  2000-09-05  9:04 ` Jonathan Larmour
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas.Karlsson @ 2000-09-05  6:16 UTC (permalink / raw)
  To: ecos-discuss, aeb

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: [ECOS] UART communication
@ 2000-09-05 22:32 Andreas.Karlsson
  2000-09-06 10:01 ` Jonathan Larmour
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas.Karlsson @ 2000-09-05 22:32 UTC (permalink / raw)
  To: jlarmour; +Cc: ecos-discuss, aeb

> 

> Can you clarify what you mean by CTS/RTS enabled? How did you 

> enable this?

> Jifl



I enabled it with the cyg_io_set_config-function like this:



cyg_serial_info_t settings_buf;



settings_buf.baud=CYGNUM_SERIAL_BAUD_57600; //had to modify the sources in
aeb_serial.h

settings_buf.stop=CYGNUM_SERIAL_STOP_1;

settings_buf.parity=CYGNUM_SERIAL_PARITY_NONE;

settings_buf.word_length=CYGNUM_SERIAL_WORD_LENGTH_8;

settings_buf.flags=CYG_SERIAL_FLAGS_RTSCTS; //enable CTS/RTS



err = cyg_io_lookup( "/dev/ser0", &ser0_hdl );

if(ENOERR != err)

{

	printf("Couldn't find /dev/ser0 !!\n");

}

len=sizeof(cyg_serial_info_t);

err=cyg_io_set_config(ser0_hdl, CYG_IO_SET_CONFIG_SERIAL_INFO,
&settings_buf, &len);



When checking the Line Status Register after receiving the zero-byte there
is an overrun error. 

The value of LSR is 0x62.

/Andreas

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: [ECOS] UART communication
@ 2000-09-06 10:21 Andreas.Karlsson
  2000-09-06 10:31 ` Jonathan Larmour
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas.Karlsson @ 2000-09-06 10:21 UTC (permalink / raw)
  To: jlarmour; +Cc: ecos-discuss, aeb

Ok,

I've been trying today to connect to a terminal on a Laptop just to check
that the 57600kbps is working and it works very well. But maybe you are
right that CTS/RTS doesn't work. I hope I don't have to rebuild any of the
tools just eCos, right?

/Andreas

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

end of thread, other threads:[~2000-09-07  0:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-05  6:16 [ECOS] UART communication Andreas.Karlsson
2000-09-05  8:52 ` Dave Airlie
2000-09-05  9:03   ` Gary Thomas
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

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