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]

Re: Question about time interrupt


ness wrote:
> 
> Hi all.
>  We are working on plateform of vr4300-vrc4373. How does cpu handle
> the interrupt in the sourcecode. And how to decide address of function
> which is processing the interrupts.

When the eCos kernel is enabled, the timer interrupt is hooked using an
eCos interrupt object in kernel/VERSION/src/common/clock.cxx in the
Cyg_RealTimeClock class constructor. The vector used is
CYGNUM_HAL_INTERRUPT_RTC which is defined in
hal/mips/vrc4373/VERSION/include/plf_intr.h to be interrupt 5:

// The vector used by the Real time clock. The default here is to use
// interrupt 5, which is connected to the counter/comparator registers
// in many MIPS variants.

#ifndef CYGNUM_HAL_INTERRUPT_RTC
#define CYGNUM_HAL_INTERRUPT_RTC            CYGNUM_HAL_INTERRUPT_COMPARE
#endif

Note if you were writing an application, you would use the equivalent
kernel C API functions to enable the interrupt handler, and not the
"native" C++ interface used within the kernel in clock.cxx.

If you want to take over this particular interrupt yourself, then you will
not be able to use timeslicing or timer functions in the eCos kernel. If
you want to share the interrupt with the eCos kernel, simply use the eCos
kernel timer functions, alarms, etc. as described in the documentation.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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