ts-7000
[Top] [All Lists]

[ts-7000] Re: best way to do periodic work

To:
Subject: [ts-7000] Re: best way to do periodic work
From: "Charles" <>
Date: Thu, 24 Jun 2010 01:43:42 -0000
Hi --

--- In  "ignac.kolenko" <> wrote:
>
> i'm new to the system, and for a project i'm working on, i'm in need of a 
> task to wake up every 500usec to 1msec to monitor digital I/O lines on the 
> TS7500 unit. There may be a need to read/write data on I2C devices as well at 
> this time. essentially a 1kHz to 2kHz sampling interval would best sum up the 
> timing requirements.
> 
> what is the best way to manage this on this unit. doing some tests i found 
> that having a task usleep(1000) to generate a 1msec wakeup didn't keep up. 
> getting closer to 1/4 second (usleep(250000)) seemed to create accurate 1/4 
> second timing.
> 
> is there a better way of doing this on the TS7500?? is there a better task 
> delay function than usleep()??

You are running into the granularity of the timer.  Search the lists for info 
on 'HRT' high resolution timer option when building your kernel and for '10ms'. 
 It comes up quite often here.

The thread here is a good start:
http://tech.groups.yahoo.com/group/ts-7000/message/16963
and a patch/summary here:
http://tech.groups.yahoo.com/group/ts-7000/message/17024

Note: you have to check that the Cavium chip has HRT support in the kernel.  I 
believe it does, but if not, you have to add it, using the ep93xx patches from 
the thread above as a guide; or check the LAKML.

If you get it to work, please post a summary for others.  

regards, ........ Charlie

> 
> can a user task configure a timer that fires off an interrupt to task at this 
> rate??
> 
> running a task that does nothing but I/O work generates obviously 99% cpu 
> utilization, but the console prompt, etc., appear to be quite responsive. 
> busybox "top" command reports overall CPU load in this situation as 34% which 
> makes me think that there's plenty of horsepower to do a 2kHz to 1kHz 
> sampling rate.
> 
> 
> or will I need to implement a kernel module to manage this, as I would assume 
> kernel timing would be more accurate than userland delay timing??
> 
> any thoughts would be valuable.
> 
> -ig
>




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

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