This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: Sv: Vs: Timer interrupts and scheduler
Stephen Mose Aaskov wrote:
> I guess what I´m really looking for here is how to make the system
> clock tick.
Look at other ports for analogies.
> I have a test application running on my target board that starts up twp
> threads, each having a loop flashing some LED´s and a call to
> cyg_thread_dealy().
>
> When started the first resumed thread is run, then interrupted by the
> second thread. After that a context switch to the idle thread is
> performed and nothing else happends.
That's not much info to go on! I assume you're confident your test program
definitely _should_ do more than that. Perhaps the best thing to do would
be to debug the kernel itself with GDB. Perhaps try enabling kernel
instrumentation. See the kernel documentation for this
> I´m using the multi level queue scheduler with timeslicing, and the
> observed behaviour makes my think that a system timer nessecary for
> decing when to slice time isn´t updated.
That type of detail entirely depends on the HAL implementation.
> Where in the documentation can I find that information?
http://www4.ncsu.edu:8030/~abdudani/ecos/docs/the-ecos-hardware-abstraction-layer.html
and more specifically
> 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.
Generic code does! See Cyg_RealTimeClock::isr() at the bottom of
kernel/current/src/common/clock.cxx
But it does depend on the HAL support working, i.e. the
HAL_INTERRUPT_ACKNOWLEDGE macro.
> 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?
http://www4.ncsu.edu:8030/~abdudani/ecos/docs/hal-porting-platform.html
The period is actually an arbitrary value - it's just whatever the
hardware requires in order to provide the resolution defined by
(CYGNUM_HAL_RTC_NUMERATOR/CYGNUM_HAL_RTC_DENOMINATOR).
Jifl
--
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine