This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]