This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: How to set clock related options?
- From: Savin Zlobec <savin at elatec dot si>
- To: caocangmou at sina dot com
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 26 Sep 2003 10:49:18 +0200
- Subject: [ECOS] Re: How to set clock related options?
caocangmou wrote:
Given the configuration :
Real-time clock numerator : 1000000000
Real-time clock denominator : 100
Real-time clock base prescale : 8192
OSC/Clock Frequency :20000000
and the discription below,should the Real-time clock period be calculated like this ?:
Real-time clock period = 10(ms)/((OSC/Clock Frequency)/base prescale/1000(msecs per sec))
=10/(20000000/8192/1000)
=4
but the value in configuration is 10!Is that right ?
Have you checked how your hw timer is initialized in HAL_CLOCK_INITIALIZE ?
How it is set based on frequency, prescale and period parameters ?
This are hardware specific values and doing math without knowing what
the values exactly maen is of no use.
savin
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss