[ECOS] Question about clock tick in ecos? Thanks

Qiang Huang jameshq@liverpool.ac.uk
Thu Jan 30 15:15:00 GMT 2003


Hi all:
   Could someone pls help me on this quite simple question but which I can't
figure it out. Thanks

for the system heart beat in ecos 10ms/tick

let's draw it as:

*tick* -- 1ms -- 2ms -- ... -- 10ms  -- *tick* -- 1ms -- 2ms -- ... --
0ms  -- *tick*  -- 1ms -- 2ms -- ... -- 10ms  -- *tick*  -- 1ms -- 2ms --
... -- 10ms  -- *tick*

if an external interrupt happens and just across the "tick" then when should
the tick happen again?

as: ( IRQ1 has higher priority than the RTC )

tick ------------ 1ms -- ... ----- 10ms  -------------- tick ------------
1ms ------------ 2ms ----- ... ---- 10ms  --------
                                                             **if IRQ1
happens here    (no tick here)        to here and exit **    (tick here ???
or tick here?? )

Q1. so should the *tick interrupt* happens just after the exit of the
IRQ1( around 1ms after the tick should happen but not happen) ?

Q2. or no *tick interrupt* until the after 10ms as indicated in the graph?

Q3. If the timer is freely running the during the time of IRQ1 timer will
get to the limit and set the flag bit but not interrupt to the
microprocessor because irq is disabled while processing the IRQ1, if nothing
has done to clear the flag bit of the timer, it will triger the interrupt
after execution exits from IRQ1, Is this correct?

Q4. so the tick interrupt will happen at around 2ms, this will make the
system heart beat not at 10ms, Is this correct?

Q5. if not should we clear the timer flag bit before the higher priority IRQ
exit when the counter already reach the limit during the IRQ?


Thanks a lot.


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list