From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18977 invoked by alias); 29 May 2008 18:23:44 -0000 Received: (qmail 18968 invoked by uid 22791); 29 May 2008 18:23:43 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 May 2008 18:23:18 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1K1mm5-0006Nx-00; Thu, 29 May 2008 20:22:53 +0200 Date: Thu, 29 May 2008 18:23:00 -0000 From: Andrew Lunn To: ariga masahiro Cc: Andrew Lunn , ecos-discuss@ecos.sourceware.org Message-ID: <20080529182253.GC22071@lunn.ch> Mail-Followup-To: ariga masahiro , Andrew Lunn , ecos-discuss@ecos.sourceware.org References: <4782BE28.8030706@mlbassoc.com> <000601c8750f$5ffb19b0$1c0110ac@ariga> <001001c87522$98475a50$1c0110ac@ariga> <000c01c8b72c$95df1bd0$1c0110ac@ariga> <20080516125053.GA27629@lunn.ch> <001901c8b971$a14202c0$1c0110ac@ariga> <20080519131803.GA16046@lunn.ch> <001b01c8ba18$785ab0d0$1c0110ac@ariga> <20080520121817.GC28890@lunn.ch> <000601c8c165$406e0970$1c0110ac@ariga> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000601c8c165$406e0970$1c0110ac@ariga> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: In trouble of timer operations X-SW-Source: 2008-05/txt/msg00103.txt.bz2 On Thu, May 29, 2008 at 05:23:19PM +0900, ariga masahiro wrote: > Hello everyone, > > In order to certify timer operations I inserted next codes at top of > run_tests func in timeslice2.c. The best way to verify the timer operations is to use the given test programs. clocktruth will tell you if your clock it ticking at the correct rate. > My intention is to insert 10msec delay by cyg_thread_delay(1) > and count timer ticks between using HAL_CLOCK_READ and display difference > time. I suggest you first read and understand: http://ecos.sourceware.org/docs-latest/ref/hal-clocks-and-timers.html HAL_CLOCK_READ will return the number of hardware ticks since the last system tick. Since the system tick is by default 10msec, you should never get HAL_CLOCK_READ return more than 10ms. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss