[Coco] Disto 4-in-1 clock2 with CocoSDC

Robert Gault robert.gault at att.net
Mon Jan 19 23:01:54 EST 2015


Bob Devries wrote:
> Well, after installing a new battery in my Disto 4-in-1, I find that the clock
> is not being read correctly even though I installed the correct module for
> clock2 from the repo. I have my Disto SCII in a MPI slot 4 and the CocoSDC in
> slot 3. NitrOS9 is booting from the CocoSDC.
>
> I communicated this to Darren, and he tells me that the H/W clock cannot be read
> until the CocoSDC is finished with its initialisation.
>
> As far as I remember, the clock module(s) are started by the INIT module. It
> seems that any clock hardware module needs to be MPI aware, and find the current
> slot number from somewhere (in memory?), and switch to its own slot when it is
> needed.
>
> Question is:
> 1. when is the (hardware) time of day clock first accessed, and
> 2. can the MPI slot be "stolen" at that point?
>
> Just a few thoughts....
>
> Regards, Bob Devries
> Dalby, QLD, Australia
>

As long as your clock2 routine turns off interrupts, it can search the MPI at 
any time for a hardware clock. $FF7F is readable and the data can be saved. Then 
you can try all slots looking for an RTC, save that data so no further search is 
required, and swap MPI slots as needed to read the RTC.

Any initialization routine by rights should kill interrupts until finished, so 
there ought not to be a conflict between the SDC and an RTC.

Robert




More information about the Coco mailing list