linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC5200,PSC in uart mode, receiving problem
@ 2005-10-10 11:37 Tomasz Prochownik
  2005-10-10 13:13 ` AW: " Achim Machura
  2005-10-10 18:38 ` Wolfgang Denk
  0 siblings, 2 replies; 5+ messages in thread
From: Tomasz Prochownik @ 2005-10-10 11:37 UTC (permalink / raw)
  To: linuxppc-embedded

Hello.
I'm beginner in ppc linux, so I believe, you can help me. I hope you'll =
be able to understand my english :o).

I have MPC5200Lite board with Linux from Denx (kernel 2.4.25).
I try to use PSC in UART mode to read chars from other system.

My init ttyS function:

   i_Fd =3D open("/dev/ttyS2", O_RDWR | O_NOCTTY |O_NDELAY);

   if (i_Fd =3D=3D -1 )
   {DEBUG_OUT("[ERROR]\r\n");}
   else
   {
	 tcgetattr(i_Fd,&strBufOptions);=09
	 bzero(&strOptions, sizeof(strOptions));
	 strOptions.c_cflag =3D Baud | CS8 |CREAD |CLOCAL;
	 strOptions.c_iflag =3D 0;
	 strOptions.c_oflag =3D 0;
	 strOptions.c_lflag =3D 0;
	 strOptions.c_cc[VTIME] =3D 0;
	 strOptions.c_cc[VMIN] 	=3D 0;
	 tcflush(i_Fd, TCIFLUSH);
         tcsetattr(i_Fd,TCSANOW,&strOptions);
   }


Everything works fine until first framing error (FE)  in receiver. Since =
then function read(i_Fd,DataBuffer,CO_MAX_BUF_LEN-1) returns number of =
received chars, but value of every char in DataBuffer is zero.

I have done some experiments and noticed one more strange things:

1. I use hyperterminal in 115200 baud as root console
2. If I change speed to 9600, send one char to MPC5200 (framing error?) =
and change speed back to 115200 -> uart blocks (there is no response in =
the console).
..so maybe bug isn't in my code...?
I have read in errata about blocking uart receiver(bug ID: 364) , but I =
don't know it can be in my application.

Best regards

-=3D=3D=3D-
Tomasz Prochownik
MCD Electronics
33 861 60 35 w. 13
916@mcd.com.pl

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: MPC5200,PSC in uart mode, receiving problem
@ 2005-10-11  7:18 Wolfgang Denk
  2005-10-11  8:10 ` AW: " Achim Machura
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2005-10-11  7:18 UTC (permalink / raw)
  To: achim.machura, Linuxppc-Embedded (E-Mail)

In message <81A66F72DCACD511B0600002A551BFCB08EE8AD4@kuumex05.barco.com> you wrote:
> 
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.

Even better, post a patch here on the list so we all can benefit.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The only time the world beats a path to your door is when you are  in
the bathroom.

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

end of thread, other threads:[~2006-02-02 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 11:37 MPC5200,PSC in uart mode, receiving problem Tomasz Prochownik
2005-10-10 13:13 ` AW: " Achim Machura
2005-10-10 18:38 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-10-11  7:18 Wolfgang Denk
2005-10-11  8:10 ` AW: " Achim Machura
2006-02-02 18:22   ` Frank Bodammer

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 NNTP newsgroup(s).