All times are UTC-06:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: RTC going off the roof
PostPosted: Tue May 29, 2007 7:33 am 
Offline

Joined: Tue Dec 05, 2006 6:26 am
Posts: 34
Location: Santiago, Chile
Hi there!

Another question about the real-time clock: one of the 2 board I bought is having a problem with the real-time clock - it is setting the date in 2016 and I promise my car is not a 1982 DeLorean :-)

We tried to set the clock using hwclock under Debian but it did not work (I have not had a chance yet to try it on the other board).

Can anyone confirm how to check the clock?
Thanks in advance
Olivier


Top
   
PostPosted: Wed May 30, 2007 7:55 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Hi there!

Another question about the real-time clock: one of the 2 board I bought is having a problem with the real-time clock - it is setting the date in 2016 and I promise my car is not a 1982 DeLorean :-)

We tried to set the clock using hwclock under Debian but it did not work (I have not had a chance yet to try it on the other board).

Can anyone confirm how to check the clock?
Thanks in advance
Olivier
There is an RTAS clock driver in /proc/rtas - you can write a value to this and it'll set the clock properly.

The MPC5200B has an RTC built in but it loses power when the board loses power - this is a design flaw of the chip. To fix it Gerald designed in a small PIC with a small embedded flash and a realtime clock (this also allows the ac-back-behaviour and potentially some other power management functionality). So the only way to truly access this PIC is through the RTAS clock.

A little while ago (2.6.9 or thereabouts) a lot of changes were made to in-kernel time code and RTC drivers which means RTAS isn't used in RTC emulation for some reason, and hwclock relies on ISA clocks and the old Linux RTC framework which isn't really the same.

If anyone wants to go ahead and fix this up, that'd be great. The easiest way is to patch the 'hwclock' scripts in your distribution but that means mimicing a lot of the hwclock tool's functionality in script form.

hwclock tool could also be patched to use RTAS.

The other way is to create an RTAS RTC driver in drivers/rtc which uses RTAS.

Take your pick. It is a Linux bug, not a board problem or an RTC problem, that it cannot handle an industry standard abstracted clock interface properly anymore.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Wed May 30, 2007 8:55 am 
Offline

Joined: Tue Dec 05, 2006 6:26 am
Posts: 34
Location: Santiago, Chile
Hi Matt!

Thanks for this great, clear report. We'll let you know of any progress on this.

Cheers
Olivier


Top
   
 Post subject:
PostPosted: Sun Jun 10, 2007 8:25 pm 
Offline

Joined: Tue Dec 05, 2006 6:26 am
Posts: 34
Location: Santiago, Chile
Hi folks!

Since I created noise here... I may also update you. After swapping the 2 boards we have in Santiago (the second one is at a friend's lab), we swapped the boards... and they both work. It sounds like the problem was the power supply at my friend's: he inherited an old one that worked for other projects but was not fully functional in this case.

The Linux distribution's hwclock utility worked perfectly with a proper power supply.

Thanks for the hints
Cheers
Olivier


Top
   
 Post subject:
PostPosted: Mon Jun 11, 2007 12:22 am 
Offline
Genesi

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1422
Olivier - when are we going to see the pictures and information about your presentation? :) Please update you EFIKA Project blog! Thanks!

R&B :)

_________________
http://bbrv.blogspot.com


Top
   
PostPosted: Mon Jun 11, 2007 11:02 am 
Offline

Joined: Wed Oct 25, 2006 7:18 pm
Posts: 42
Quote:
Hi there!

Another question about the real-time clock: one of the 2 board I bought is having a problem with the real-time clock - it is setting the date in 2016 and I promise my car is not a 1982 DeLorean :-)
We tried to set the clock using hwclock under Debian but it did not work (I have not had a chance yet to try it on the other board).
I had a simular problem with my Efika. The clock and even the MAC address changed randomly. I found out the that battery dropped dead (around 2V).

Replacing the battery didn't help. Somehow the default values were screwed up and the invalid data didn't allow to set clock. After around a week of trouble I found out how to fix it.

Remove the battery and powerup/powerdown the board (with a proper amount of time between. Let the memory cells settle.) until you can set the clock and it survives a reboot. Then put in in the battery.
IMPORTANT: Put in the battery while the board is powered up and the clock is valid. This ensures the stuff is valid when turning off the board.
Quote:
Can anyone confirm how to check the clock?
Well, your problem sounds exactly like mine. After performing the procedure above all my clock/MAC problems were gone.

Geit


Top
   
 Post subject:
PostPosted: Tue Jun 12, 2007 9:10 pm 
Offline

Joined: Tue Dec 05, 2006 6:26 am
Posts: 34
Location: Santiago, Chile
Quote:
Olivier - when are we going to see the pictures and information about your presentation? :) Please update you EFIKA Project blog! Thanks!

R&B :)
Bill, Raquel, I've updated the blog ( http://www.gautherot.net/efika ). Unfortunately, the folks who were supposed to take pictures never published them :( so I've uploaded the only one I managed to get. I hope you like the type of things we do with this little platform! We should get some more pictures of this week's event, with the Efika-based host, the AVR demo board, its programmer and the USB uplink for host communication - otherwise we'll just take some in the lab and pretend they were taken there ;-) Seriously, we've quite impressed by all the work that can be done. Congratulations!

By the way, shall I take a picture of the Efika in front of a screen with the OpenOffice logo? That's a real eye-catcher... I'll have my full setup back in about 10 days, if you can wait.

Cheers
Olivier


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group