Subject: Re: Still some problems with RTC (some progress)
To: None <port-next68k@netbsd.org>
From: Cory Bajus <cbajus@mts.net>
List: port-next68k
Date: 04/20/2006 22:02:35
On Sun, Apr 09, 2006 at 09:48:44AM -0500, Cory Bajus wrote:
> The changes I posted earlier for dealing with the MCS1850 RTC (including
> a fix suggested by Timm Wetzel) have been committed to HEAD (thanks
> christos).  However, there still seems to be some problems writing to the
> counter registers.  Writing to RTC_CNTR3 (the LSB) works fine but any
> attempts to write to the other three counter registers only seems to
> invert the previously stored value.  Here is a patch to enable (and fix)
> the debug code - I'm interested to hear if others experience the same
> behavior.

Ho hum, talking to myself again here... (is there anybody out there?)

I've made some progress on the problem writing to the RTC registers.  It
seems that if I use the 'burst mode' when writing (i.e. shift in only the
address of RTC_CNTR0 and then shift in all 32 bits of the seconds 
counter) all four registers are set properly.  I need to clean up my code a 
bit before posting a patch but I wanted to see if anyone can confirm the
problem I reported above, and can help me test my patch on different
hardware (just in case my colour slab is 'unique').  I'm also interested
to hear if people have hardware with the older RTC (MC68HC68T1) that could
test both the existing code and a patch to enable 'burst mode' when
writing.
                                                                                
Thanks,                                                                         
Cory.