rtc not responding on mini2440

japie
Hello,

My rtc is not responding anymore, it is not counting and when I set my
system time with "date" and wanted to write it to rtc with "hwclock -w" but
nothing happens and dmesg is telling me "s3c_rtc_setpie: pie=0"

davef
What is the battery voltage?  Mine lasted about 2 years, before having to
replace them.

japie
I understand that with low battery time is lost but on power off but is
that the reason the rtc doesn't "take" the new time I set with hwclock?

Juergen Beisert
Sometimes just the corresponding driver has a bug. Did you try with a
different kernel?

japie
No, I set the time when installing my custom filesystem and set the time on
that moment with hwclock and that was working fine back then.
It has been running great for a couple of months but now the time is over a
month off (the date from the last time it was powered on) and refuses to
take new time with hwclock.

It is a mini2440 7" and is used as dashboard on a tractor puller so it's
live is hard but the complete thing is sealed in hummie seal so it is
protected against vibrations and water...

Juergen Beisert
So maybe the silicon dies due to some kind of electric discharge or
overvoltage. Powersupplies on automotive devices tends to be noisy and full
of spikes.

davef
Got an oscilloscope?  I'd try probing each side of X1 the 32.768kHz crystal
or ceramic resonator with a 10 times probe and see if the RTC is even
running.

japie
Using the scope for checking the clock, why didn't I think of that?
The strange thing is that I can read the rtc with hwclock but can't write
to it, will check the hardware with the scope...

Power supply should be OK, DC-DC converter (stable 5,4V.) and some extra
condensators for filtering and a small inline 12V battery for stabilizing.
(mainly since hitting the starter doesn't seem to leave juice for the ARM
;)

davef
I guess if you can read it then it must be "running".  Sounds like the
frequency is incorrect or it is not running all the time.  

I last set my RTC about 4 months ago and it is within a minute of the
correct time.

What is the minimum rated input voltage for the DC-DC converter?  How have
you connected up this "inline 12 Volt battery"?

I found setting the date using Busybox took a few tries, I think the help
is not very clear.  I found only this worked:

date --set "2012-07-26 20:58" 

and I could only set UTC.  Couldn't set it for my own time zone.

japie
*solved*

davef suggested to replace the battery but my mind refused to believe that
it would make hwclock command fail.
Guess what, after replacing the battery everything works as promised, my
best bet is that it died when sealing the board.
Still strange that without battery the RTC is refusing input, also it's
time wasn't counting during session all-tough it should be powered by the
boards power supply then.

Anyway, thank you all for your help and support for a silly Dutchmen that
refused to try the obvious at first...