Forum Discussion
Altera_Forum
Honored Contributor
12 years agoProblem in getting 1 usec Interval Timer to work using NiosII and QSYS
Hello everyone, Kindly guide me in resolving the following problem. I am unable to get the Interval timer to work for 1usec. It is working for 1msec. Case: I have a DE2115 kit. Using QSYS I h...
Altera_Forum
Honored Contributor
12 years agoYou can get a more accurate timestamp by getting the hardware to count the ticks for you.
You could also use a tickless timer scheme to get more accurate long intervals - but they'll still be subject to interrupt latency variations and the cost of the ISR dispatch. I'd guess that interrupt entry and exit both require a full flush of the instruction pipeline - probably 5 clocks each. You need to save and restore any registers, the register bank switching is probably also a pipelline flush. That is 20% of the cpu time (at 100MHz) before you do anything else. You aren't going to do anything withthat interrupt.