This is the mail archive of the ecos-devel@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]

Sv: Vs: Timer interrupts and scheduler


I guess what I´m really looking for here is how to make the system clock tick.

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.

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.

Hope someone can help me out a bit here...

Regards
 Stephen


----- Original Message ----- 
From: Stephen Mose Aaskov <sma@2m.dk>
To: Nick Garnett <nickg@ecoscentric.com>
Cc: <ecos-devel@sources.redhat.com>
Sent: Tuesday, September 24, 2002 2:42 PM
Subject: Sv: Vs: Timer interrupts and scheduler


Where in the documentation can I find that information?
 
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.
 
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?
 
 
- Stephen
 
----- Original Message ----- 
From: Nick Garnett <nickg@ecoscentric.com>
To: Stephen Mose Aaskov <sma@2m.dk>
Cc: <ecos-devel@sources.redhat.com>
Sent: Monday, September 23, 2002 4:17 PM
Subject: Re: Vs: Timer interrupts and scheduler


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

> I´m working with a partly port of Ecos (1.3, CVS updated) to a MIPS
> R3000 platform.  I´m having some trouble figuring out how and when
> to call system timer functions and scheduler from within a timer
> interrupt ISR.  Currently I have no timer ISR, but I do have timer
> interrupts coming in all the time.
> 
> Which actions should a timer interrupt ISR (VSR? DSR??) perform?
> 
> Hope somone can clearify how these thing are interconnected in ecos.
> 

You do not need to write your own timer ISR, the default one in the
kernel does all the necessary work.

What you do have to write are the HAL_CLOCK_* macros for controlling
the timer, and set the value of CYGNUM_HAL_INTERRUPT_RTC to the
timer's interrupt vector.

See the documentation on the HAL for details.

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






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