From: David Fernandez <dfernandez@cct.co.uk>
To: Moussa Ba <mba@embedded-zone.com>
Cc: Gary Thomas <gary@mlbassoc.com>,
birahim.fall@elsys-design.com, ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Re: RE : [ECOS] Understanding CYGNUM_HAL_RTC_PERIOD NUMERATOR DENOMINATOR
Date: Thu, 22 Jun 2006 14:35:00 -0000 [thread overview]
Message-ID: <1150986907.29450.45.camel@software.cct.co.uk> (raw)
In-Reply-To: <449AA52A.8060004@embedded-zone.com>
On Thu, 2006-06-22 at 10:11 -0400, Moussa Ba wrote:
> Thank you for the replies, the way I have used RTC_PERIOD is that my
> CPU_CLOCK is at 32MHz, while I prescale the timer by a factor of 8 hence
> yielding at timer clock of 4Mhz, therefore my RTC_PERIOD is
> 4,000,000/DENOMINATOR or 40,000. I use this value to preload my 16 bit
> timer with 65536 - 40000 with automatic reloading of this value, this
> essentially gives me the 10ms tick.
>
You could define a RTC_FREQUENCY with that value of 4000000 (in Hz) in
the cdl, then you especify the PERIOD as calculated
{ ...FREQUENCY / ...DENOMINATOR }.
That way you get some differentiation between the CPU frequency and the
hw. timer frequency. You can put a default_value { ...CPU_CLOCK / 8 }...
> I think David makes a valid point that it would help to put platform
> specific values, however, these are also dependent on the hardware timer
> setup. Though, this can be made specific to timer clocks (prescaler
> values that is).
>
No problem, if there are more than one way to set your timer, you can
put a PRESCALER option in a platform-variant cdl or in a configuration
template, or just in a configuration file that you import... Or you can
just put the RTC_FREQUENCY option in there.
Anyway, the thing of the timer that defines the OS sw. timers can be
considered a essential parameter for the platform, so when doing the
platform cdl and the code you choose the best/more flexible method yo
have available, and define parameters and constrains to avoid wrong
values. For example you can put a legal_values in DENOMINATOR as {1 to
(...RTC_FREQUENCY / 65535) }.
David.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
prev parent reply other threads:[~2006-06-22 14:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 7:19 [ECOS] " FALL
2006-06-22 12:56 ` [ECOS] " David Fernandez
2006-06-22 13:05 ` David Fernandez
2006-06-22 13:17 ` Gary Thomas
2006-06-22 13:43 ` David Fernandez
2006-06-22 14:12 ` Moussa Ba
2006-06-22 14:35 ` David Fernandez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1150986907.29450.45.camel@software.cct.co.uk \
--to=dfernandez@cct.co.uk \
--cc=birahim.fall@elsys-design.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=gary@mlbassoc.com \
--cc=mba@embedded-zone.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).