MAX32600 User’s Guide
System Clock, Timers/Counters, Watchdog Timers and Real Time Clock
10.3 Real Time Clock (RTC)
4. The RTC can is now be enabled by setting
bit to 1.
Turning on the RTC Block and 32kHz Crystal Oscillator
By default, the RTC block and the 32kHz crystal oscillator are disabled following an RTC POR event.
To enable RTC operation during
, set the power sequencer control bit
to 1. Alternately, write 1 to
to enable RTC operation during
. This will power on the RTC block and, based on the RTC POR default
setting of
, the RTC oscillator will be enabled to run as well.
Set the RTC timer to a zero starting value
• Write
to 00000000h.
• The
status bit will change to 1 to indicate that a clock domain synchronization is pending; the bit will change back to 0 once the
synchronization has completed.
–
Note
: It is not necessary to wait for the pending bit to go low before writing to other RTC registers; this pending bit is most useful to signal when it is
permitted to go to LP0 or LP1.
If the RTC Time of Day Alarm will be used, set the appropriate compare register(s)
• Write
or
to the desired compare value.
• Perform a clear operation on one of the flags in
to ensure the register write just performed is synchronized correctly.
• The
status bit will change to 1 to indicate that clock domain synchronization is pending; the bit will change back to 0 once the
synchronization has completed.
Note
After writing to any of the following registers:
, or
, in order to ensure that the syn-
chronization to the 4kHz clock domain completes correctly, it is necessary to follow the register write with a separate write of a ’1’ value to the
register. (Any value can be used that results in a clear or attempted clear of any of the flags in bits [4:0] of this register, even if
none of the flags are set; the write is merely needed to trigger the synchronization process.)
Set the prescaler to the desired setting
• Write the
RTCTMR_PRESCALE.width_selection
field to the desired clock rate prescale setting.
Rev.1.3 April 2015
Maxim Integrated
Page 566