Timing of events in an ISR

Till Straumann strauman at slac.stanford.edu
Mon Oct 18 19:41:54 UTC 2004


Mark VanderVoord wrote:
> I am sending an event from an ISR.  The task waiting
> on the event is the highest priority task in the
> system (priority 5... where two others are priority
> 100+).  
> 
> It appears to take 150 usec on my AU1100 between the
> actual interrupt firing, and the task being allowed to
> run.  This processor runs at 400MHz, so this delay
> sounds excessive to me.  If I poll the flag instead of
> using the interrupt, I can act on it within 4 usec
> (but I am obviously using up a lot more CPU time).

I have done similar, excessive tests on powerpcs
(~300Mhz) and the average latency observed is in the
'a few microseconds' ballpark which is what you'd expect.

Could you post your code (including the timing)?

Did you make sure:
  - your ISR doesn't do excessive work
  - your task really has the correct priority
  - task preemption is not disabled (globally or
    for one of your lower priority tasks)
  - your code which determines the latency is correct

> 
> What factors contribute to this delay?  Is there
> anything that I can do about it?

There *must* be something wrong...

-- Till

> 
> As a side note, I noticed that there are a lot of
> timing tests which come with RTEMS.  Would any of
> these be useful in nailing down just how much time
> these calls should take?
> 
> Thanks!
> 
> Mark S VanderVoord
> Self-Guided Systems, LLC
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 





More information about the users mailing list