[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [microblaze-uclinux] Uartlite timing broken?(trying to grab frames in non-canonical mode)



Hello,
well I need to use VTIME since i want to get one message frame. Basically i want to block the read on a filedescriptor until I get one complete frame and it's VTIME which is the variable telling 
when one frame ends. If i set VTIME to zero i do not get a complete message frame and will have to implement something(if even possible) which decodes the rawdata to modbuss frames.

//Nils

-----Original Message-----
From: owner-microblaze-uclinux@xxxxxxxxxxxxxx on behalf of Dr. Johann Pfefferl
Sent: Mon 12/22/2008 11:22 AM
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: Re: [microblaze-uclinux] Uartlite timing broken?(trying to grab frames in non-canonical mode)
 
Hello,

I use the function in the attachment to get a raw serial communication channel between
two devices.
The function uses glib-2.0 calls but the important statements for the initialization
of the serial line are simple libc calls.

Hope this helps,
  Johann

Nils Hermansson <Nils.Hermansson@xxxxxxxxxxxxxx> wrote:
> Hello everyone,
> have come across a problem when trying to grab modbus frames on the 2nd uart.
> The problem I am having is that I am unable to grab complete frames going on the uart when using VTIME. I really do not now where to start looking for the problem is it a driver problem or is it the uart IP block which does not work. I have checked with an oscilloscope and with third part hardware that the messages on the line are correct so either it's a hardware problem on my ml505 platform or it's the uartlite driver where timing is broken.
> 
> Interesting part is that when i change VTIME there is no big difference at all on the data I get, could it be that non-canonical mode isn't implemented in the uartlite driver?
> 
> Has anyone else used the uarts in non-canonical mode and got it to work?
> 
> These are my termios settings.
> 
> bzero(&my_termios, sizeof(my_termios));
> my_termios.c_cflag=B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
> my_termios.c_lflag = 0;
> my_termios.c_iflag = IGNPAR;
> my_termios.c_oflag = 0;
> my_termios.c_cc[VMIN]  = 2;
> my_termios.c_cc[VTIME] = 20;   
> 
> Best regards
> Nils Hermansson
> 



-- 
Dr. Johann Pfefferl   ---------------   mailto pfefferl at gmx dot net
==
 -o)   A computer program does what you tell it to do,
 /\\        not what you want it to do.               
_\_v-                                                 

<<winmail.dat>>