[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] 10 msec number of ticks bug..
- To: microblaze-uclinux@xxxxxxxxxxxxxx
- Subject: [microblaze-uclinux] 10 msec number of ticks bug..
- From: "DeviPrasad Natesan" <ndprasad@xxxxxxxxx>
- Date: Tue, 23 May 2006 14:14:54 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=t1nzhiHBfkYsYeVnv3Rk0CWoqHb5h0Cm++3c+/6yrGJBgVFF+E/hSSF9WXjjRYntzwfJu71cQAu4gRpWp6hB3kPH/Mc3gES/FMYVMGVHi5eFe8nWcJ7vTrKlU+dfPLdjTjXaUuEUg/SThIwevu5njpM6zyTEleWtjpFW0iTPAX8=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
Hi John,
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.
Please confirm this and if it is right apply the change.
Thanx
- Prasad
___________________________
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/