[beagleboard] RTC base address

96 views
Skip to first unread message

sanju More

unread,
May 5, 2009, 1:03:11 AM5/5/09
to beagl...@googlegroups.com


Hi,

What is RTC register address? i want to enable RTC in u-boot? is it possible to enable RTC in u-boot.

--Sanjeev

Søren Steen Christensen

unread,
May 5, 2009, 3:36:38 AM5/5/09
to beagl...@googlegroups.com
> What is RTC register address? i want to enable RTC in u-boot?
> is it possible to enable RTC in u-boot.

The RTC is in the TPS65950-chip, which you can access using the I2C-bus. Take care - It isn't battery-backed-up and thereby loosing it's state when the power is removed from the board...

You find information about its registers in the TRM for the TPS65950-chip (http://focus.ti.com/lit/ug/swcu050d/swcu050d.pdf) chapter 3...

Best regards - Good luck
Søren

sanju More

unread,
May 5, 2009, 6:39:22 AM5/5/09
to beagl...@googlegroups.com
I am writing values to RTC registers using imd(u-boot command), is it works?

--Sanjeev

--- On Tue, 5/5/09, Søren Steen Christensen <sorensch...@stofanet.dk> wrote:

Søren Steen Christensen

unread,
May 5, 2009, 7:20:12 AM5/5/09
to beagl...@googlegroups.com
> I am writing values to RTC registers using imd(u-boot command), is it
works?

I would expect so - You might however need to control the mSecure signal
(see TRM and schematics for RevC) to be able to set the RTC value - I can't
remember for sure, but go ahead and give it a try...

Philip Balister

unread,
May 5, 2009, 7:34:36 AM5/5/09
to beagl...@googlegroups.com
Speaking of the RTC, the Overo brings out the VBACKUP line. Is
providing a battery backup as simple as connecting a suitable battery
(or capacitor), or is there more to it than this?

Philip

Søren Steen Christensen

unread,
May 5, 2009, 8:23:56 AM5/5/09
to beagl...@googlegroups.com
> >> I am writing values to RTC registers using imd(u-boot command), is
> it
> > works?
> >
> > I would expect so - You might however need to control the mSecure
> signal
> > (see TRM and schematics for RevC) to be able to set the RTC value - I
> can't
> > remember for sure, but go ahead and give it a try...
>
> Speaking of the RTC, the Overo brings out the VBACKUP line. Is
> providing a battery backup as simple as connecting a suitable battery
> (or capacitor), or is there more to it than this?
>
> Philip
>

AFAIR - Connect the battery/capacitor and remember to enable charging using
a couple of I2C writes to TPS65950.

In order to be completely sure - Please double check the TRM and Data
Manual, but straight out of my mind I'm 99.9% confident it's that easy :-)
Søren


Sean D'Epagnier

unread,
May 5, 2009, 8:59:44 AM5/5/09
to beagl...@googlegroups.com
For those of us who have beagle boards and no rtc, and can't always
rely on ntp. Does anyone have a software solution which can ensure
that we don't have future timestamp problems? I have been running
into this lately where I am compiling programs and "make" sometimes
gets confused and does the wrong thing. I just need to store the time
at shutdown and restore it at boot so I never have files with future
times.

Sean

Koen Kooi

unread,
May 5, 2009, 9:03:23 AM5/5/09
to beagl...@googlegroups.com


Op 5 mei 2009 om 14:59 heeft "Sean D'Epagnier"
<geckos...@gmail.com> het volgende geschreven:\

>
> I just need to store the time
> at shutdown and restore it at boot

Angstrom does that by default

Preston Wilson

unread,
May 5, 2009, 9:21:25 AM5/5/09
to Beagle Board
On May 5, 9:03 am, Koen Kooi <k...@beagleboard.org> wrote:
> Op 5 mei 2009 om 14:59 heeft "Sean D'Epagnier"  
> <geckosena...@gmail.com> het volgende geschreven:\
>
>
>
> > I just need to store the time
> > at shutdown and restore it at boot
>
> Angstrom does that by default

And if you are not running Angstrom...

Create a shutdown script that does this

date +%m%d%H%M%Y > /etc/savedate

And in a startup script that does this

date `cat /etc/savedate`

The above is not tested. man date and man strftime will help in
correcting any problems.

-Preston

sanju More

unread,
May 5, 2009, 9:46:53 AM5/5/09
to beagl...@googlegroups.com
Hi,

i did following commands at u-boot prompt.
# imw 0x4A 0x0d 0x00  -- Stop RTC
# imw 0x4A 0x00 0x36  -- Sec
# imw 0x4A 0x01 0x54  -- min
# imw 0x4A 0x02 0x90 
# imw 0x4A 0x03 0x05
# imw 0x4A 0x04 0x09
# imw 0x4A 0x05 0x97
# imw 0x4A 0x0D 0x01 -- enable RTC

After enabling i am reading the values by giving following command

# imd 0x4A 0x00 10
But the values are not changing. i want to know is what i am doing correct? did i missed something.

--Sanjeev

--- On Tue, 5/5/09, Preston Wilson <rpwil...@gmail.com> wrote:

From: Preston Wilson <rpwil...@gmail.com>
Subject: [beagleboard] Re: RTC base address

Søren Steen Christensen

unread,
May 5, 2009, 9:54:15 AM5/5/09
to beagl...@googlegroups.com
> i did following commands at u-boot prompt.
> # imw 0x4A 0x0d 0x00  -- Stop RTC
> # imw 0x4A 0x00 0x36  -- Sec
> # imw 0x4A 0x01 0x54  -- min
> # imw 0x4A 0x02 0x90 
> # imw 0x4A 0x03 0x05
> # imw 0x4A 0x04 0x09
> # imw 0x4A 0x05 0x97
> # imw 0x4A 0x0D 0x01 -- enable RTC
>
> After enabling i am reading the values by giving following command
>
> # imd 0x4A 0x00 10
> But the values are not changing.
> i want to know is what i am doing correct? did i missed something.

Did you check the information in the TPS65950 TRM table 3.21 with respect to
the mSecure line?

Which board revision do you have B or C? You can control the state of the
mSecure line on Rev C, but not on Rev B AFAIR. I can't remember if it's
supposed to be high or low in order to alter the RTC...

Gerald Coley

unread,
May 5, 2009, 7:30:13 PM5/5/09
to beagl...@googlegroups.com
For what it is worth, so does the REV C3 Beagle, except, it will have an actual battery already soldered in.
 
Gerald

Guylhem Aznar

unread,
May 6, 2009, 12:17:28 PM5/6/09
to beagl...@googlegroups.com
Hello,

IMHO it would be interesting to have the restore feature done by uboot
if an environment variable like lastknownrtctime exist

Keep saving the time in shutdown somewhere it can be accessed by uboot
(like with setenv), but let it be loaded automagically by uboot if the
parameter is present.

That'd really make the feature distribution independant. I really
prefer avoiding tweaking boot scripts- because then you must make sure
it's done before the fsck, in ro, etc.

On Tue, May 5, 2009 at 09:21, Preston Wilson <rpwil...@gmail.com> wrote:
> Create a shutdown script that does this
> date +%m%d%H%M%Y > /etc/savedate

--
Dr. Guylhem Aznar, MD PhD

Unité d'Analyse Médico-Économique
Service de Santé Publique et d'Économie de la Santé
Pôle SPSSR
CHU de Fort de France
BP 632
97261 Fort De France Cedex
Martinique, France

Tel : 05 96 55 23 47
Fax : 05 96 75 84 57

Søren Steen Christensen

unread,
May 6, 2009, 12:31:51 PM5/6/09
to beagl...@googlegroups.com
> For what it is worth, so does the REV C3 Beagle, except,
> it will have an actual battery already soldered in.

When will Rev C3 be available - I expect(ed) this to be in the *far* future?
Søren


Gerald Coley

unread,
May 6, 2009, 12:57:45 PM5/6/09
to beagl...@googlegroups.com
Far has many definitions. In this case far would meean we start shipping in a couple of weeks.

Gerald

Søren Steen Christensen

unread,
May 6, 2009, 1:01:44 PM5/6/09
to beagl...@googlegroups.com

Cool - I will then wait getting my new Rev C board – Other new hidden features? J

  Søren

 

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of Gerald Coley
Sent: Wednesday, May 06, 2009 6:58 PM
To: beagl...@googlegroups.com
Subject: [beagleboard] Re: RTC base address

 

Far has many definitions. In this case far would meean we start shipping in a couple of weeks.


Gerald



 

 Søren


<br

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.18/2096 - Release Date: 05/06/09 06:04:00

Gerald Coley

unread,
May 6, 2009, 1:09:43 PM5/6/09
to beagl...@googlegroups.com
Well, we have the mounting holes now plated through and connected to ground. We finally were able to get TPS65950 parts, so REV C3 will have those. And we added a few components to add a slight improvement to the S-Video signal.
 
Gerald
Reply all
Reply to author
Forward
0 new messages