[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] 10 msec number of ticks bug..
Speaking of timers and their handling, is it true that sigaction is
not working in the microblaze flavor of uClinux, only sighandler? That
signals (particularly alarm signals) abort io calls (poll/read/write) and
are not restarted, or is that true when called with a timeout only? I'm
using an old copy of uClinux out of CVS, maybe these items have been looked
into or that's just life. Thanks in advance for any hints.
Bret
-----Original Message-----
From: owner-microblaze-uclinux@xxxxxxxxxxxxxx
[mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] On Behalf Of John Williams
Sent: Sunday, June 04, 2006 8:24 PM
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: Re: [microblaze-uclinux] 10 msec number of ticks bug..
Hi Prasad,
DeviPrasad Natesan wrote:
> I had 10msec accuracy problem in my system (ntpd had many drift). Then
> i could figure out 300 ticks drift happening every second becos of the
> wrong initial value in the timer register i belive. We verified my
> change with the free running counter implemented in the fpga and
> comparing the value every one second and we could see a drift of
> around 6 ucsec.
>
> The change is in the microblaze_timer.c
>
> From
> count = ((unsigned)-1) - CONFIG_XILINX_CPU_CLOCK_FREQ / rate - 2;
>
> to
> count = -(CONFIG_XILINX_CPU_CLOCK_FREQ / rate) + 1;
>
> One extra tick is required (might be bcos of an extra tick happening
> while loading the value back to the comparator register.
Interesting - it's a long time since I looked at that code, but from memory
I
did the timer counter load value based on the formula in the opb_timer
datasheet. As you say, perhaps it's necessary to compensate for the time it
takes to actually reset the counter?
> Please confirm this and if it is right apply the change.
You say you tested with with ntpd / ntpclient? Can you please post a few
details about your test, and I'll try to replicate it here.
Thanks for your efforts,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/