The issue seems similar yes, but i'm in doubt about if the leon can use multiple ISRs per clock tick. How can i confirm if this is a bug?<br><br><br>Best,<br>JM<br><br><br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 2:33 PM, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@gwmail.gwu.edu">gedare@gwmail.gwu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I wonder if this is this related to PR 1495?:<br>
<a href="https://www.rtems.org/bugzilla/show_bug.cgi?id=1495" target="_blank">https://www.rtems.org/bugzilla/show_bug.cgi?id=1495</a><br>
<br>
The symptom is similar, but I don't think the LEON3 has the same<br>
structure of clock driver.<br>
<br>
-Gedare<br>
<div><div></div><div class="h5"><br>
On Fri, Jan 28, 2011 at 9:11 AM, Joćo Rasta <<a href="mailto:freakforever@gmail.com">freakforever@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm using gettimeofday() to profile a function. For this i do:<br>
><br>
>         struct timeval tim;<br>
>         // *Get actual clock<br>
>         gettimeofday(&tim, NULL);<br>
>         double t1=tim.tv_sec+(tim.tv_usec/1000000.0);<br>
><br>
><br>
>         // *GNC Calculations starting point<br>
>         Execute_gnc();<br>
>         // *Calculations termination point<br>
><br>
><br>
>         // *Calculate elapsed time with GNC calculations.<br>
>         gettimeofday(&tim, NULL);<br>
>         double t2=tim.tv_sec+(tim.tv_usec/1000000.0);<br>
><br>
>         procDelay = (t2 - t1 + 0.0275);<br>
>         if (t1 > t2)<br>
>             printf(" WARNING %f > %f\n",t1,t2);<br>
>         else<br>
>             printf("%f\n",procDelay);<br>
><br>
> But sometimes t1 is larger than t2, which should not be possible since t2 is<br>
> allways measured after t1. For instance, the above code produces the<br>
> following when this issue happens:<br>
><br>
> WARNING 567996584.559981 > 567996584.550001<br>
><br>
> The above code runs in loop and this happens roughly once in an hour (just<br>
> an estimate). Is there any known overflow issue with the usec counter that i<br>
> should be aware? RTEMS is running with a LEON-3.<br>
><br>
><br>
> Best,<br>
> JM<br>
><br>
</div></div>> _______________________________________________<br>
> rtems-users mailing list<br>
> <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
><br>
><br>
</blockquote></div><br>