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: Sv: Vs: Timer interrupts and scheduler


"Stephen Mose Aaskov" <sma@2m.dk> writes:

> Where in the documentation can I find that information?
> 

The latest documentation is not on the sources web site, but you can
find descriptions of the HAL_CLOCK_* macros here:

http://www.vsr.si/ecos/ecos/cvsdoc/hal-interrupt-handling.html

You should also read the porting guide:

http://www.vsr.si/ecos/ecos/cvsdoc/hal-porting-guide.html


> I got it running now, except that I had to install a interrupt
> routine that ack´s the timer interrupt, still trying to figure out
> why that wasn´t done by the generic code.

It is done there. The clock ISR calls
Cyg_Interrupt::acknowledge_interrupt() to acknowledge the interrupt in
the interrupt controller. If the timer device also needs something to
be done to it that must be done in HAL_CLOCK_RESET(), which you need
to write.

> 
> But now I´m faced with yet another problem, now regarding the
> constants CYGNUM_HAL_RTC_PERIOD and CYGNUM_HAL_RTC_DENOMINATOR.
> 
> Is CYGNUM_HAL_RTC_PERIOD supposed to express some time interval
> measured in clock tics?  Parts of the code suggest so, but what are
> the semantics?

CYGNUM_HAL_RTC_PERIOD is the value that you should put into the timer
counter hardware to achieve an interrupt period equal to
CYGNUM_HAL_RTC_NUMERATOR/CYGNUM_HAL_RTC_DENOMINATOR nanoseconds. The
default clock frequency is 100Hz, so you need a CYGNUM_HAL_RTC_PERIOD
value to give 10ms ticks.


-- 
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/


--
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]