Time

AmigaOne X5000 platform specific issues.

Time

Postby dstastny » Tue Jan 30, 2018 5:22 pm

I know there have been issues reported with RTC but that is not problem I am seeing as the RTC is running fine. My issue is post boot the accuracy of the system time diverges away from the RTC. If I call setclock load it goes back in sync. Now if I remember the Amgia OS was designed to function without a clock so timing was maintained via power supply cycle or vblank timing on the custom chips not sure I remember clearly which. When I look in Ranger that shipped with OS its says these frequencies are both 50. Well Im in USA and I am not aware of any 50 HZ power supply :D . And if I do the math they amount of time that the Amiga clock is diverging at sure does look like about a 10HZ. So is this a bug with motherboard misreporting or bug in OS? Any settings I can change to fix?

Thanks
Doug
dstastny
 
Posts: 42
Joined: Fri Dec 16, 2016 7:31 am
Location: Atlanta GA

Re: Time

Postby broadblues » Wed Jan 31, 2018 3:45 am

Your system time is gaining 12 minutes an hour?
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 537
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Time

Postby dstastny » Wed Jan 31, 2018 7:45 am

@broadblues. Yeah about that. I didn't notice at first as my coding was crashing a alot. Last few weeks I have had it running and timing. Reset with load hour later it would gain time. Real noticble after few days and no reboot.

Doug
dstastny
 
Posts: 42
Joined: Fri Dec 16, 2016 7:31 am
Location: Atlanta GA

Re: Time

Postby xenic » Wed Jan 31, 2018 6:15 pm

dstastny wrote:So is this a bug with motherboard misreporting or bug in OS? Any settings I can change to fix?

I am also in the US and just ran "setclock load" after 1 hour 45 minutes of uptime. My system time jumped back 15 seconds; indicating that my system time is gaining about 8.6 seconds per hour. I'll need to try again later to confirm that result. That's nowhere as severe as your time gain but still unacceptable in my view.

I seriously doubt that there is any AC power going to the motherboard from the power supply but you'd need to check the specs for your supply to know for sure.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1120
Joined: Sun Jun 19, 2011 1:06 am

Re: Time

Postby broadblues » Wed Jan 31, 2018 8:27 pm

xenic wrote:
dstastny wrote:So is this a bug with motherboard misreporting or bug in OS? Any settings I can change to fix?

I am also in the US and just ran "setclock load" after 1 hour 45 minutes of uptime. My system time jumped back 15 seconds; indicating that my system time is gaining about 8.6 seconds per hour. I'll need to try again later to confirm that result. That's nowhere as severe as your time gain but still unacceptable in my view.


That's not an unreasonable drift for a standalone machine. If you have PC I bet it's just as bad. My laptop drifts by somewhat more than that. My SAM in the same ballpark, except is lags rather than gains.

What machine are you on?


I seriously doubt that there is any AC power going to the motherboard from the power supply but you'd need to check the specs for your supply to know for sure.


I'm moderatly sure that UNIT_VBLANK etc are emulated on AmigaOS 4machines. Though I can't find the reference that made me think that.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 537
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Time

Postby dstastny » Wed Jan 31, 2018 11:46 pm

@Xenic if you run ranger what is it showing for Frequencies?

Doug
dstastny
 
Posts: 42
Joined: Fri Dec 16, 2016 7:31 am
Location: Atlanta GA

Re: Time

Postby xenic » Thu Feb 01, 2018 1:16 am

broadblues wrote:That's not an unreasonable drift for a standalone machine. If you have PC I bet it's just as bad. My laptop drifts by somewhat more than that. My SAM in the same ballpark, except is lags rather than gains.

What machine are you on?

I'm using an X5000 that I bought in August of last year. I ran a 6 hour test and the system time gained 52 seconds. My X1000 does far better than that. I never noticed the time drift before because I reboot a lot because of Odyssey crashes/freezes or testing code that I'm debugging.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1120
Joined: Sun Jun 19, 2011 1:06 am

Re: Time

Postby xenic » Thu Feb 01, 2018 1:38 am

dstastny wrote:@Xenic if you run ranger what is it showing for Frequencies?

Doug

CPU Speed: 1995 MHz
Front Bus Side Speed: 798 MHz
Time Base Speed: 24 MHz
Frequencies: VBlank: 50 PSupply: 50 EClock: 24937500 Hz

I think some of the frequencies might be emulated for the benefit of 68k code; not sure though.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1120
Joined: Sun Jun 19, 2011 1:06 am

Re: Time

Postby tonyw » Thu Feb 01, 2018 11:36 am

The system clock in all modern machines (not Classic) is derived by dividing the CPU system clock by the appropriate (large) number. Since the system clock is itself generated by a PLL linked to a cheap crystal, it's not by any means accurate and you take what you get.

The division ratio can usually be trimmed to get the free-running clock rate pretty close, but you're talking about U-Boot stuff, well before OS4 starts to run. I don't know if the clock trim can even be adjusted by the time that timer.device gets hold of it. The result should be constant within about 1 part in 10^6, but not necessarily accurate.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1311
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Time

Postby nbache » Thu Feb 01, 2018 12:18 pm

tonyw wrote:I don't know if the clock trim can even be adjusted by the time that timer.device gets hold of it.
That would be quite interesting to know.

If it were possible, somebody could make a small utility program to run a long-term test (say, 8 hours) to compare the system clock to a fetched NTP time and find an according adjustment for the constant, then use the result to make the adjustment in another small command early in Startup-Sequence (or even in a Kickstart module).

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1267
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Next

Return to Platform: AmigaOne X5000

Who is online

Users browsing this forum: No registered users and 3 guests