Initialization and Configuration
492
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Hibernation Module
Use the following steps to program GPIO port K pins K[7:4] 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. Configure the GPIOWAKEPEN and GPIOWAKELVL registers at offsets 0x540 and 0x544 in the GPIO
module. Enable the I/O wake pad configuration by writing 0x0000.0001 to the HIBIO register at offset
0x010.
4. When the IOWRC bit in the HIBIO register is read as 1, write 0x0000.0000 to the HIBIO register to lock
the current pad configuration so that any other writes to the GPIOWAKEPEN and GPIOWAKELVL
register will be ignored.
5. Clear any pending interrupts by writing a 1 to the PADIOWK bit in the HIBIC register.
6. The hibernation sequence may be initiated by writing 0x4000.0152 to the HIBCTL register. Note for
Port M external wake, the user must enable VDD3ON mode and set the RETCLR bit in the HIBCTL
register.
6.4.5 RTC or External Wake From Hibernation
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/External Wake-Up and start the hibernation sequence by writing 0x0000.005B to
the HIBCTL register at offset 0x010.
6.4.6 Tamper Initialization
Use the following steps to configure the Tamper module to interrupt the processor when a TMPR signal
has triggered:
NOTE:
Unlike other functions, the Tamper pins do not need to be configured for the GPIO in the
GPIOAFSEL register. The Tamper IO Control and Status (HIBTPIO) register overrides
configurations made to the GPIO module.
1. Write 0x0000.0041 to the HIBCTL register at offset 0x010 to enable the 32.768-kHz Hibernate
oscillator and enable the RTC.
2. Enable the four Tamper I/O to trigger on the a high state on any of the pins by writing 0x0F0F.0F0F to
the HIBTPIO register at offset 0x410.
3. Write 0x0000.0001 to the HIBTPCTL register to enable the tamper.
NOTE:
When tamper is enabled, the following HIBCTL register bits are locked and cannot be
modified:
•
OSCSEL
•
OSCDRV
•
OSCBYP
•
VDD3ON
•
CLK32EN
•
RTCEN