ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Reading the DIO ports on TS-7800

To:
Subject: Re: [ts-7000] Re: Reading the DIO ports on TS-7800
From: "Eric Robishaw" <>
Date: Fri, 8 Aug 2008 10:46:44 -0500
Charlie,

Now I'm a little confused.
W/o the usleep I can read 20khz easily.  I was expecting a maximum of 100hz.  So as I understand it then, the "10ms for the process to become runnable again" refers to a system delay that is caused only by issuing sleep that evidently doesn't occur otherwise...

But of-course w/o a sleep, the cpu use goes way up!

Is there any other way you know of to effectively sleep w/o killing the cpu and not being impeeded by the timer resolution?

Eric


On Fri, Aug 8, 2008 at 7:54 AM, charliem_1216 <> wrote:

Hi Eric --



--- In ts-7000%40yahoogroups.com, "Eric Robishaw" <> wrote:
>
> It doesn't appear to be a sleep issue... as I believe usleep calls
nanosleep

It shows up as a sleep issue, ...


> anyhow.
> I just can't read the registers any faster than 50hz (see Jim's
message if
> you haven't already).

And I have ... The issue is timer resolution. As Jim correctly said,
the timer resolution is 10 mS in normal cases. You asked for a sleep
period of at least 10 mS, so the delay ends up being 10 mS, plus
another 10 mS for the process to become runnable again. Your total
delay is 20 mS, and 1/.02 = 50 Hz.

The high resolution timers in recent kernels is clean way to solve
this problem, *transparently* giving timers resolution of 1 nS,
without having to write a special kernel driver to use an available HW
counter. It works great on the other TS boards (ep93xx based), but I
don't know if a) it was available when the TS ts=7800 kernel was
branched, or b) if TS enabled it; hence my suggestion.

Jim is also right that it is a FAQ, and you can find lots more
discussion about it in the archives and the site I gave you.

But in any case, good luck with your project!

Regards, ........ Charlie

>
> Eric
>
>
>


__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<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