[time-nuts] time-nuts Digest, Vol 189, Issue 32

Hal Murray hmurray at megapathdsl.net
Mon Apr 20 23:45:12 UTC 2020


tim.strommen at gmail.com said:
> I understand that "everything can be fixed with software", but as a hardware
> engineer, I prefer to save my power at the hardware level for true low-power
> solutions.  There is a huge difference in power draw between updating a few
> registers for a counter, versus powering up an external IO interface,
> toggling an interrupt to wake up an entire power domain, having a
> microprocessor come out of sleep, reading the UNIX time register over the
> high energy IO bus, reading the standard time registers over the high energy
> IO bus, doing some math for a few hundred cycles, the writing out the
> corrected UNIX values over the high energy IO bus, then putting the
> microprocessor to sleep.  It's probably several orders of magnitude more
> energy to fix it with software, then just having a better hardware design. 

Nobody was suggesting anything that.

The 32 bit register just ticks away.  Aside from setting the time, nobody ever 
writes to it.  Sometime in 2036, it overflows.

The 2 lines of code go after you read the clock.
  t = readclock();
  if (t < build time)
    t += 0x100000000;

They only get executed when you are already up and running and doing stuff and 
read the clock because you want to  know what time the chip thinks it is.

---------

Actually, the 32 bit register will have to get updated occasionally.  Leap 
seconds.

At least until some kernel switches to using TAI time.



-- 
These are my opinions.  I hate spam.







More information about the Time-nuts_lists.febo.com mailing list