ts-7000
[Top] [All Lists]

[ts-7000] Re: ts-7800 uart, latency?

To:
Subject: [ts-7000] Re: ts-7800 uart, latency?
From: "naturalwatt" <>
Date: Sun, 12 Jul 2009 08:24:55 -0000
--- In  "BxWen" <> wrote:
>
> Hi:
> 
> I am trying to receive some data from /dev/ttts2. The data come in at a rate 
> of 1 byte per 5 millisecond. What I want is to response to this one byte data 
> every 5 millisecond. But I actually receive nothing, or 2 bytes at 10 
> millisecond interval. Is this a Linux kernel thing so that I can only read 
> every 10 millisecond? What should I do to make the system response faster?
> 
> Thanks.
> 
> bing
>

It is a kernel thing.  The default scheduling interval is 10mS, so if your 
process is sleeping waiting for data, it will only be woken up every 10mS.  In 
order to avoid this, you can either change the kernel to a shorter scheduling 
interval or not go to sleep.  I would set the scheduling interval to 3 or 4mS 
in order to get your data at 5mS intervals.

If you open the serial device O_NONBLOCK then use select with a zero timeout to 
poll for data, you can respond to data immediately.  This does mean you will 
run at 100% CPU utilisation and no other process will get a look in.  This may 
or may not be a problem.

I think some of the other responses to your question may have missed the point 
as it's not a baud rate question.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU