After SW_OFF is performed, then RTC will be left in a state where further operations
are not possible, even if a power-on is performed by the OFF_ON timer or the wakeup
events. The RTC CORE domain should be reset after a power off in order to return RTC
to a functional state. If this is not architecturally possible, then the following
sequence can be used instead to restore functionality. This sequence takes about 100
microseconds to execute (between 3 and 4 cycles of the 32768Hz clock).
This sequence needs to be done after receiving a wakeup event that requires the
device to re-enable RTC and return to full power. This sequence causes a write
error. In order to return RTC to the prior state, you will also need to clear the
write error.
- After writing SW_OFF, you MUST NOT do an explicit re-lock of the RTC_KICK0 or
RTC_KICK1 registers. Continue to step 2 when recovery from power off needs to be
done.
- Read the current value of RTC_GENRAL_CTL, and clear the SW_OFF bit. Write the
resulting value to RTC_GENRAL_CTL. The SW_OFF bit should never read as 1, but an
explicit bitmask operation to ensure that SW_OFF is written as 0 is appropriate
for software clarity.
- Poll RTC_SYNCPEND until WR_PEND reads as 0. This should take up to 1 cycle of
the 32KHz clock.
- Write RTC_KICK0 with 0 to explicitly re-lock RTC_CD.
- Poll RTC_SYNCPEND until WR_PEND reads as 0. This should take up to 1 cycle of
the 32KHz clock.
- The preceding sequence caused a write error and leaves RTC in the locked state.
To clear the write error, perform a normal write sequence to write 0x00000008 to
RTC_SYNCPEND. This is an important step to return this debug field to its normal
value.
- After clearing the write error, you should also do a Reload From Battery Backed
Domain operation to ensure that RTC will read the correct time value.