On Tue, 23 Dec 2008, kcfarleysw wrote:
> I am new to TS7200 and Linux. I need to use a timer for periodic
> polling. I know the EP9301 has four timers. I'm not sure which are
> allocated to Linux. What timers are available to users? What is the
> correct Linux way to access the user available timers?
Linux maintains a system clock with a resolution (in the 2.4 kernel
supplied with TS-Linux) of 10millisec. Any user space program can use
standard Unix/Linux timer functions alarm(2), getitimer(2), setitimer(2)
e.g. see
http://www.quepublishing.com/articles/article.asp?p=23618&seqNum=14&rl=1
All this is standard stuff and not in any way specific to ts-linux or this
board etc. If you have access to a standard linux desktop, try
man alarm
etc to read the manual pages for the functions. They can be found also on
the web.
If you need resolution better than 10ms then you need to write a kernel
driver to control one of the free timers not used by the kernel, and
provide an interface for calls from userspace. An example of such a driver
is the adc driver by Phillip McCarley that is on the files section of the
group. It uses a free hardware timer to generate an interrupt to time the
reading of the ADC. You can use modify it to suite your needs.
> Is there any
> documentation on what services are available with TS-LINUX? I went
> through the includes for the cygwin cross compiler and found a timer.h
> but it doesn't seem to be available?
"Doesn't seem to be available"?
Sorry but that doesn't make sense. The header file is there, ergo it is
available.
Jim
----------------------------------------------------------------------------
HomePage: http://www.comp.leeds.ac.uk/jj
TS7200 Page: http://www.comp.leeds.ac.uk/jj/linux/arm-sbc.html
------------------------------------
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/
|