These initialization steps should be
done after the first power-on of the ON domain. In the two-voltage-domain
integration, the durability of writes to the ON domain must be protected. All
unlock/re-lock writes to RTC_KICK0 and RTC_KICK1 must be included for this device.
Note you can get false WRT_ERR if you wrt before UNLOCK bit is set. To prevent this
SW should always poll UNLOCK to insure it is set before Wrt to mmrs
- Read the RTC_SYNCPEND register and verify that the RD_PEND register is 0. Poll
until RD_PEND is 0 if it is not already.
- Enable the 32KHz clock if it not already enabled.
- If this is done by
writing registers in RTC, then this must be done by writing RTC_KICK0
and RTC_KICK1, then writing some or all of the RTC_ANALOG registers then
writing zeros to RTC_KICK0 to re-lock the functional lockout.
- The RTC_SYNCPEND register can be used to check if the 32KHz clock is
toggling.
- Wait until the 32KHz clock is stable before proceeding.
- Write 1 to RTC_GENRAL_CTL.O32K_OSC_DEP_EN.
- This write must be preceded by unlock writes to RTC_KICK0 and RTC_KICK1
and followed by a zero write to RTC_KICK0.
- This write must respect the timing requirements that are implied by the
reset value of 0 for this register field. The RTC_SYNCPEND register
should be read to observe a falling edge of the 32KHz clock based on the
O32K_CLK_OBS bit.
- If the ana_osc32k_clk is the preferred clock for the use case, the
AUX_32K_EN field of RTC_GENRAL_CTL needs to be written 0 as well at this
time.
- Wait until RTC_SYNCPEND.WR_PEND is 0 after writing this in order to
ensure that the newly activated synchronization logic is done. A fixed
wait of 60 microseconds can be used instead of polling
RTC_SYNCPEND.WR_PEND.
- Initialize the ON domain RTC MMRs
in the order of increasing address offset. The RTC_ANALOG registers can be omitted if initialized in an earlier
step.
- RTC_SUB_S_CNT
- RTC_S_CNT_LSW
- RTC_S_CNT_MSW
- RTC_COMP
- RTC_OFF_ON_S_CNT_LSW
- RTC_OFF_ON_S_CNT_MSW
- RTC_ON_OFF_S_CNT_LSW
- RTC_ON_OFF_S_CNT_MSW
- RTC_DEBOUNCE
- RTC_ANALOG
- RTC_SCRATCH0[a]
- RTC_GENRAL_CTL
- Poll RTC_SYNCPEND.WR_PEND until 0.