To: | "" <> |
---|---|
Subject: | Re: [ts-7000] Re: high resolution timers and real time |
From: | Walter Marvin <> |
Date: | Mon, 9 Apr 2012 10:55:39 -0700 (PDT) |
1) you need some sort of timer hardware. Its possible that this could be spi or serial based 2) you need to hook it up to an interrupt. I29 is available on the Ts7500 iff you don't use it for serial 3) you need to write a simple interrupt driven Linux driver if you use spi or serial, then there will be latency between the reading of the timer and the timer value; but this should be approx the same for all readings and can be discounted. The hardware itself would have to keep the count The are several books on writing Linux device drivers that you can get on the web the driver design is simple if interrupt driven. simply increment a kernel variable for each interrupt. Then provide the driver upper
layers to read the timer value as either an ioctl value or a level 2 Linux read. Technologic has done a adequate job of documenting the Kernel build procedure required to compile and build the driver. Download the appropriate kernel source then add the source for your (loadable) device driver. Set up the appropriate device in the /etc directory and load the driver on boot. modifying Technologic's start-up scripts. You programs can then read your Hi-res timer using standard Linux level 2 blocking library calls. You might also want to expand the driver to write values in the /proc directory for debugging and control purposes Walter From: komal <> To: Sent: Monday, April 9, 2012 12:29 AM Subject: [ts-7000] Re: high resolution timers and real time I am new to Linux programming but I do have considerable experience with microcontrollers. If you can guide me to the process, or perhaps provide me a suitable example I am sure I will be able to implement the solution, with your help. Waiting for your reply, Komal RAUF --- In , Walter Marvin <> wrote: > > This is for technoligic or someone like myself to do... not for beginner > > > > ________________________________ > From: komal <> > To: > Sent: Thursday, April 5, 2012 12:20 AM > Subject: [ts-7000] Re: high resolution timers and real time > > >  > > thank you for your reply. I would really appreciate it if you can elaborate on the solution you have mentioned. I am a Linux newbie so not very familiar with the development process. > Thank you :) > > --- In , Walter Marvin <walter.marvin@> wrote: > > > > If you don't need the serial uarts you can steal this interrupt to support hi res timers. Its a relitively simple kernel mod. > > > > thanks > > > > Walter > > > > > > > > ________________________________ > > From: João Trindade <trindade.joao@> > > To: > > Sent: Monday, April 2, 2012 11:22 AM > > Subject: Re: [ts-7000] Re: high resolution timers and real time > > > > > >  > > I don't think that patch will work on the ts-7500. > > > > > > On Mon, Apr 2, 2012 at 8:39 AM, komal <komalrauf@> wrote: > > > > > > > > > >Dear Sir, > > > > > >I have recently acquired a ts-7500 board with the development kit. The SD card comes with a 2.6.24 Linux Kernel. After a few days of experimenting I have realized that my application (controlling a servo through PWM) will require HRT and RT support which the Kernel is unable to provide (maximum timer resolution I am getting on the current Kernel is 20ms). > > > > > >I am new to Linux and embedded systems development and hence I am a little confused about how to tackle this problem. I do not understand what you mean by applying the patches and how to apply the patch. Can i simply do it on-board my board with the SD-Card. I have a windows PC with Eclipse for Development. > > > > > >Any help you can provide me will be highly appreciated. Thank you. > > > > > >Regards, > > >Komal RAUF > > > > > >--- In , Peter Gammie <peteg42@> wrote: > > >> > > >> Charles, any anyone interested in hrtimers: > > >> > > >> With Andrew's help I managed to build a 2.6.32.3 kernel that seems to work. Attached are a config and a patch, based on this: > > >> > > >> http://lkml.org/lkml/2009/7/22/119 > > >> > > >> that enable hrtimers. I've lightly tested it on a ts7260 with 64Mb of memory. I loaded the kernel via TFTP with: > > >> > > >> load -r -b 0x00218000 -h 192.168.1.1 z > > >> exec -c "console=ttyAM0,115200 ip=192.168.1.50:192.168.1.1:192.168.1.1:255.255.255.0:ts7200a:eth0:off root=/dev/mtdblock1" > > >> > > >> (i.e. no special memory options or anything.) > > >> > > >> So the routine is to apply Matthieu's patches, then this one. I expect it will apply to other kernel versions (specifically 2.6.29.6 if you want -RT) without too much bother - but be careful that the Kconfig patch applies to the right system type! > > >> > > >> As for the clock multiplexing, Charles's suggestion of using just a PREEMPT (not RT) kernel results in better behaviour under light periodic load (it doesn't flicker while running top on the console) but about the same under heavier load (scp'ing a few megabytes via ethernet). I have the CONFIG_NO_HZ (tickless) option set, which may or may not do anything in particular... > > >> > > >> So, more investigation is required. > > >> > > >> Thanks for all your help. > > >> > > >> cheers > > >> peter > > >> > > >> > > >> > > >> > > >> -- > > >> http://peteg.org/ > > >> > > > > > > > > > > > > -- > > João Trindade   <trindade.joao@> > > Telephone: +351 93 561 39 10 > > http://cnm.tagus.inesc-id.pt/joao+trindade > > > __._,_.___
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> |
---|---|---|
|
Previous by Date: | Re: [ts-7000] high resolution timers and real time, Mark Featherston |
---|---|
Next by Date: | Re: [ts-7000] high resolution timers and real time, Walter Marvin |
Previous by Thread: | [ts-7000] Re: high resolution timers and real time, komal |
Next by Thread: | Re: [ts-7000] Re: high resolution timers and real time, Kevin Cozens |
Indexes: | [Date] [Thread] [Top] [All Lists] |
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