Hello,
We are using your panelcard for some months now, and we noticed a strange behavior with the clock. Yesterday I've done some testing and we noticed that when we synchronize the time (using Linux running on the PanelCard) with a timeserver and we let it run for some hours (we have let it run almost 15 hours) we got a drift of more than 6 minutes.
We did this test on 2 PanelCards on the same time (15 hours). One panelcard is connected to your development board, another is connected with our own backplane.
Our test results are:
Board 1:
Sync 05/02/2009 at 16:01:00 with timeserver
Test 06/02/2009 at 06:55:00 (GMT on timeserver) 07:01:16 on panelcard
Board 2:
Sync 05/02/2009 16:05:00 with timeserver
Test 06/02/2009 06:58:00 (GMT on timeserver) 07:04:15 on panelcard
As you can see, the test has been running for around 14h56m and we got a drift of ±6min15sec! So that's quite a lot. The board and linux have been running all that time.
Do you have any clue why this time is drifting that much???
On an other PanelCard, where I did replaced the bootloader because we changed the bootimage, the clock is running 12 seconds wrong every 1 minute. So when we time 1 minute, this is 1min12sec on the board. This board, we did not used for the test explained above. But the fact that the time is already wrong after 1 minute, this would be a totally disaster after 15h I assume.
Any clue what this drifting could be causing? Is the fact that I changed the bootloader a possible cause??? But I didn't changed the bootloader on the two boards used for the sync test above. What could we do to get all clocks running on time without the drifting?
Kind regards and thanks in advance,
Jan Pannecoeck

Re: System Timers and date function
The problem has to do with fact, that
1. the MCK is used as the clock source for the periodic interval timer and
2. the MCK speed in Linux 2.6.22 was still hard coded to the speed of the Atmel AT91SAM9261EK Board
We planned to make a new 2.6.22 release in the near future with this fix included, but to fix this problem for now, here is a kernel patch:
http://armbedded.eu/download/support/at91sam926x-pit.patch
It may be taken offline once the new kernel release is online.
Re: System Timers and date function
I'll try it later today or tomorrow.. thanks for the patch!
Re: System Timers and date function
Hello,
I've tried the patch, and the clock is running better at the moment, but still I do have a drift of about 3-4 second over 15hours. It is at least much better than before! But is there a possibility to get this minor drifting gone also??? Should this be better with the new kernel release you are planning?
Thanks
Re: System Timers and date function
Hello Jan,
Being a little bit familiar with your programming task, can't you use GPS-time? ;)
Greetings,
Dries
Re: System Timers and date function
I maybe could do that, but at that point there should be a GPS available all the time, and that's not sure. And well, I do have a backplane available with an other clock running, and we will synchronize both boards at a fixed time, but still, if we could be able to get the drifting gone that would be nice! 4 sec in 15 hours is still a big drift if you know that the application should be able to run for ages :p And yes, a synchronization every 10 hours would be a solution if the drifting could not get fixed at the panelcard :-)
And since I know you are waiting for the portux card, I hope it soon will arrive and you can start playing around! :p
Re: System Timers and date function
I don't think it is easily possible, at least without changing the kernel to a much newer version. But you could also periodically call
hwclock -sto set the system time from the integrated RTC.