1kHz timer behavior on Cyclone V

Joel Sherrill joel at rtems.org
Wed Dec 7 21:15:23 UTC 2016

On Wed, Dec 7, 2016 at 11:44 AM, Janet Schneider <janetsc at fb.com> wrote:

> Hello,
> I am running a 1kHz timer test on the Altera Cyclone V dev board.  I
> am trying to measure the average time period between the timer firing, and
> any variance on that latency.
> I'm seeing an average of 1003 microseconds between the timer firing.
> About once a second, I see the maximum time between the timer firing go up
> to 2500-3000 microseconds.
> There are two sets of timers. One is per clock tick and one is per second.

My guesses are:

Do you have a sleep/delay statement in your thread?
There may be some work updating the time that occurs once per second. The
implementation of this area has changed so I don't remember offhand if this
is still the case.

I'm using rtems_clock_get_uptime_nanoseconds() to measure the time that the
> timer fires.  I have CONFIGURE_MICROSECONDS_PER_TICK set to 500.
> What happens when the HW interrupt timer fires?


> Has anyone else seen this (or something similar)?  Any ideas what might be
> happening here?
> Thanks,
> Janet
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161207/49e03324/attachment-0002.html>

More information about the users mailing list