From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1551 invoked by alias); 22 Oct 2003 11:30:27 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 1530 invoked from network); 22 Oct 2003 11:30:26 -0000 Received: from unknown (HELO anchor-post-37.mail.demon.net) (194.217.242.87) by sources.redhat.com with SMTP; 22 Oct 2003 11:30:26 -0000 Received: from calivar.demon.co.uk ([212.228.213.211] helo=miso.calivar.com) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1ACHC4-000NXf-0b; Wed, 22 Oct 2003 12:30:25 +0100 Received: from miso.calivar.com (miso.calivar.com [127.0.0.2]) by miso.calivar.com (Postfix) with ESMTP id 277A828DF45; Wed, 22 Oct 2003 10:57:57 +0100 (BST) To: Zi Zhou Cc: ecos-discuss@sources.redhat.com References: <3F95696C.8080400@3upsystems.com> From: Nick Garnett Date: Wed, 22 Oct 2003 11:30:00 -0000 In-Reply-To: <3F95696C.8080400@3upsystems.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] How to change CYGNUM_HAL_RTC_PERIOD ? X-SW-Source: 2003-10/txt/msg00393.txt.bz2 Zi Zhou writes: > Hi, > > I am trying to understand eCos Real time clock, especially > CYGNUM_HAL_RTC_PERIOD. Is this the parameter that decides how many > machine cycles each tick should have, in other words, the machine > cycle interval between timer interrupt? If my reference board is > 100MHz and CYGNUM_HAL_RTC_PERIOD = 10^6, is it safe to say with > everything else the same, the processor runs at 133MHz, I should > change CYGNUM_HAL_RTC_PERIOD to 1.33 x 10^6 if I don't change RTC > Numerator and Denominator? Essentially, yes. The period is usually the value to which the timer's counter or compare register is initialized. It is usually the number of cycles of the timer input clock needed to generate the required interrupt rate. The presence of (often programmable) PLLs and dividers in the path means that this is seldom a direct feed from either the crystal or the CPU clock. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss