This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF-LAUNCHXL: Selecting a GPIO source as wake-up immediately exits from hibernation

Part Number: CC3220SF-LAUNCHXL

I'm trying to understand how to wake up the MCU from the hibernation state using a GPIO.
Right now I can program a wake up using RTC:

Power_shutdown(0, shutdownTime);

it works very well. After the shutdownTime it wakes up and PRCMSysResetCauseGet() tells me it's exiting from hibernation (PRCM_HIB_EXIT).
Now I connected a pin (GPIO13) from a MEMS sensor. Usually it is in low-lovel state but when something happens it will go to the high level. Reading the document SWRU465 at page 505, I add the following:

PRCMHibernateWakeupSourceEnable(PRCM_HIB_GPIO13);
PRCMHibernateWakeUpGPIOSelect(PRCM_LPDS_GPIO13, PRCM_HIB_RISE_EDGE);

Now when I call the Power_shutdown function as above it immediately exits from the hibernation, regardless the GPIO pin state (that is still low). PRCMSysResetCauseGet() says again PRCM_HIB_EXIT, but PRCMHibernateWakeupCauseGet() returns 0.

Where is my error?

  • Hi,

    I believe you need to call PRCMHibernateEnter() to go into hibernate

    Regards
    Charles O
  • And what Power_shutdown(0, shutdownTime); is supposed to do?
    I assumed it enters in hibernation because the reset cause is PRCM_HIB_EXIT and wakeup cause is PRCM_HIB_WAKEUP_CAUSE_SLOW_CLOCK.

    It seems a convenience wrapper for PRCMHibernateEnter() in order to avoid the overhead of checking everything manually. In fact the end of the Power_shutdown function (located in <sdk>/sources/ti/drivers/power/PowerCC32XX.c) call MAP_PRCMHibernateEnter(); which is in turn defined as PRCMHibernateEnter in rom_map.h

    One thing I notice is that overwrites the sakeup source. But: 1. I can't believe TI doesn't provide a way to enter hibernation without taking care of the other sources. 2. if the other wakeup sources are disabled why it returns immediately from hibernation?

    Do you have an example that shows how to enter hibernation specifying a timeout and an external interrupt?