From: Griffin on
Hello,

I'm trying to implement code that reads in some software registers
from a peripheral after constant time intervals (ideally, a
microsecond or so). I know that EDK comes with a hardware timer
(xps_timer) and what I think is a software timer (fit_timer) and I
know how to add them to my project as well as attach them to the PLB,
but I haven't been able to find any documentation (xapp, etc.) as to
how to use either to actually time some events.

In a nutshell, I need my code to execute as follows:

while(some condition) do {
-read in software register (their values change with time)
-store the value to ddr to be used later
-wait 1 microsecond (or any arbitrary time).
}


I need to make sure that the time intervals between every time the
software register is read in are the same, always, *and* I need to
know how long that interval is, which is why I can't use a simple
while loop. From what I've seen on the Internet, using one of these
two timers seems to be the way to go.

Any advice / suggestions / examples would be greatly appreciated.

I'm using EDK 11.2 .

Thanks in advance.

-Sean.