I have the same problem as was discussed before but the prior solution of enabling the VDD3ON bit does not fix it.
I have verified that the 32kHz crystal is oscillating and my system has the VDD connected to VBAT and is always on.
The code gets stuck waiting for the WRC bit after the call to HibernateEnableExpClk( ROM_SysCtlClockGet() );
I also noticed that the VDD3ON bit and/or the CLK32EN bit does not get set if I look at the Hibernate registers with the JLINK debugger.
What's going wrong?
SysCtlPeripheralEnable( SYSCTL_PERIPH_HIBERNATE );
HWREG( HIB_CTL ) |= HIB_CTL_VDD3ON;
HibernateEnableExpClk( ROM_SysCtlClockGet() );
ROM_HibernateClockConfig( HIBERNATE_OSC_LOWDRIVE );
vTaskDelay( MS_TO_TICKS(100) );; // Allow time for the crystal to power up.
ROM_HibernateRTCSet( 0 );
ROM_HibernateRTCEnable();
// Set the match 0 register for 5 seconds from now.
HibernateRTCMatchSet( 0, 5 );
// Configure to wake on RTC match.
ROM_HibernateWakeSet( HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC );
/ Request hibernation. The following call may return because it takes a
// finite amount of time for power to be removed.
ROM_HibernateRequest();