Initialization and Configuration
491
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Hibernation Module
If the internal low frequency oscillator is used as the Hibernation module clock source, then perform the
following steps:
1. Write 0x0000.0010 to the HIBIM register to enable the WC interrupt.
2. Write 0x0008.0040 to the HIBCTL register at offset 0x10 to enable the internal low frequency oscillator.
3. Wait until the WC interrupt in the HIBMIS register has been triggered before performing any other
operations with the Hibernation module.
The above steps are only necessary when the entire system is initialized for the first time. If the
microcontroller has been in hibernation, then the Hibernation module has already been powered up and
the above steps are not necessary. The software can detect that the Hibernation module and clock are
already powered by examining the CLK32EN bit of the HIBCTL register.
6.4.2 RTC Match Functionality (No Hibernation)
Use the following steps to implement the RTC match functionality of the Hibernation module:
1. Write 0x0000.0040 to the HIBCTL register at offset 0x010 to enable 32.768-kHz Hibernation oscillator.
2. Write the required RTC match value to the HIBRTCM0 register at offset 0x004 and the RTCSSM field
in the HIBRTCSS register at offset 0x028.
3. Write the required RTC load value to the HIBRTCLD register at offset 0x00C.
4. Set the required RTC match interrupt mask in the RTCALT0 in the HIBIM register at offset 0x014.
5. Write 0x0000.0041 to the HIBCTL register at offset 0x010 to enable the RTC to begin counting.
6.4.3 RTC Match and Wake From Hibernation
Use the following steps to implement the RTC match and wake-up functionality of the Hibernation module:
1. Write 0x0000.0040 to the HIBCTL register at offset 0x010 to enable 32.768-kHz Hibernation oscillator.
2. Write the required RTC match value to the HIBRTCM0 register at offset 0x004 and the RTCSSM field
in the HIBRTCSS register at offset 0x028.
3. Write the required RTC load value to the HIBRTCLD register at offset 0x00C. This write causes the 15-
bit subseconds counter to be cleared.
4. Write any data to be retained during hibernation to the HIBDATA register at offsets 0x030-0x06F.
5. Set the RTC Match Wake-Up and start the hibernation sequence by writing 0x0000.004B to the
HIBCTL register at offset 0x010.
6.4.4 External Wake From Hibernation
Use the following steps to implement the Hibernation module with the external WAKE pin as the wake-up
source for the microcontroller:
1. Write 0x0000.0040 to the HIBCTL register at offset 0x010 to enable 32.768-kHz Hibernation oscillator.
2. Write any data to be retained during hibernation to the HIBDATA register at offsets 0x030-0x06F.
3. Enable the external wake and start the hibernation sequence by writing 0x0000.0052 to the HIBCTL
register at offset 0x010.
Use the following steps to program the external RESET pin as the wake source for the microcontroller:
1. Write 0x0000.0040 to the HIBCTL register at offset 0x010 to enable 32.768-kHz Hibernation oscillator.
2. Write any data to be retained during hibernation to the HIBDATA register at offsets 0x030-0x06F.
3. Enable the external RESET pin as a wake source by writing a 0x0000.0011 to the HIBIO register at
offset 0x02C.
4. When the IOWRC bit in the HIBIO register is read as 1, clear the WUUNLK bit in the HIBIO register to
lock the current pad configuration so that any other writes to the WURSTEN bit in the HIBIO register
will be ignored.
5. The hibernation sequence may be initiated by writing 0x4000.0152 to the HIBCTL register. Note that
when using RESET, the user must enable VDD3ON mode and set the RETCLR bit in the HIBCTL
register.