This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Sv: Vs: Timer interrupts and scheduler
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Stephen Mose Aaskov" <sma at 2m dot dk>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: 24 Sep 2002 23:43:14 +0100
- Subject: [ECOS] Re: Sv: Vs: Timer interrupts and scheduler
- References: <004c01c262ea$950b24c0$016d100a@2m.dk><m3r8fk3i4u.fsf@ecoscentric.com><00a001c263c5$5dba6900$016d100a@2m.dk>
"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