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]
Other format: [Raw text]

RE: Interrupt latency Jitter in A&M's AdderII (PPC MPC852) board


> From: Tzahi
>
> We're trying to generate a timer's interrupt exactly every 100
> milliseconds (the desired frequency is 10Hz)
> But we're facing a big variation in the timing of the actual interrupt
> handling:
>
> 1. The HW timer's resolution is 2.1e-8 (20 Nanosecond)
> 2. Events every 120 sec - there is a peaks of amplitude up to
> 3.8e-5 Sec (38
> milliseconds), sometimes the peak is small but still present
> 3. Periodic behavior (square wave) of about 5e-7 Sec (500 nanosecond) peak
> to peak every 15sec
> 4. After ~2800sec sudden change of jitter mean by 1e-7s (100 nanosecond).
[snip]
> 4. The timing is measured by setting the led ports (from the IRQ handler)
> that are connected to a time interval counter (sync on a an atomic clock)

It sounds like you expect your software interrupt handler to be able to
generate a pulse that is precisely 10Hz, with no more jitter than your
crystal oscillator. For that to work, there would have to be zero interrupt
latency. There's always some jitter in any interrupt handler, because the
interrupt latency depends upon what instruction sequence is being executed
at the time the interrupt occurs. On every CPU I've used, there are
instructions that take multiple clocks, especially if the memory isn't fast
enough to keep up with instruction fetching. If you need an exact 10Hz
signal, you'll have to use the onboard timer directly. A software-generated
pulse will never do it.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


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


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