Re: time in us in OnTimer



Even with an onboard timer chip generating interrupts at that rate, the times are
sufficiently small that DMA traffic, cache hit patterns, and other interrupts coming in
will induce significant variations in the timing. If the device is sharing the IRQ line
with another device (as would be typical in PCI), the position of the device in the IRQ
search chain for that IRQ level will also introduce variation, so this is really pushing
the envelope.
joe

On Wed, 6 Sep 2006 09:00:08 -0700, "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote:

Just forget about it. If you have such tight timing requirements, add a
hardware timer to your device, to generate interrupts at required times.
Even in that case you may not have opportunity to respond in time.

"Tio Cactus" <tomjey@xxxxx> wrote in message
news:1157527657.192532.272390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Joseph M. Newcomer napisal(a):
If you need something that precise, build an external embedded system.
Counting in
microseconds is pretty meaningless in a value as large as you specified
(I can't tell what
you intended because of the odd use of commas) but you if are asking for
something to
happen 4,560,120,320 microseconds apart, or about once every 76 hours.
So accuracy to a
microsecond is almost certainly irrelevant.

Furthermore, the best you could *possibly* hope for would be 1000
microseconds resolution,
and you are more likely to consider yourself fortunate beyond belief if
you could get
anything accurate to within 15,000 microseconds, so again counting
anything to
microseconds is pretty pointless.

Youcould use QueryPerformanceCounter for very tiny measurements, which
means that you
could time intervals of as little as a few hundred nanoseconds, with a
variance of
hundreds of milliseconds (seriously!). So what are you *really* trying
to do?
joe


In Specification of transmission which I'm writing occur tiny interval
of time e.g. Tss (means the time which is required for a host to poll
one peripheral device) Tss= 43 us
Some other period are 55us or 320us. E.g program sometimes must wait
55us to start next action. The device which program simulates require
tiny measurements. Is some way to get this ??


Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: another must-fix: major PS/2 mouse problem
    ... 44 ms in IRQ 14 is not at all OK. ... to get under 200 microseconds for everything. ... I like a TSC that measures in nanoseconds too. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: bge loader tunables
    ... I also implemented dynamic tuning for rx coal ... This value delays the generation of receive interrupts in microseconds. ... This value delays the generation of transmit interrupts in microseconds. ...
    (freebsd-net)
  • Re: bge loader tunables
    ... This value delays the generation of receive interrupts in microseconds. ... This value delays the generation of transmit interrupts in microseconds. ... Dynamic tuning sets this to a value suitable for limiting ...
    (freebsd-net)