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.

TM4C129XNCZAD: Wake up from Deep sleep

Part Number: TM4C129XNCZAD

Hello,

We have a TM4C129XNCZAD based custom board

Tivaware 2.1.1.71

TI-RTOS 2.14

When a power outage occurs, we need to save the context data and put the micro controller in deep sleep. We have super  cap backup to do this (backup is of  tens  of seconds, based on the super cap charge).  When power comes back we need wake up from deep sleep.

We are using the same signal to monitor power fail and power resume. The same signal is connected to 2 different GPIO pins for detection of power fail and resume.  The 1st GPIO for power fail detection is configured for LVL_HIGH and 2nd GPIO pin for power resumption is configured for FALLING_EDGE.

When power fails,  both GPIO pin are pulled up. The interrupt handler of the first GPIO  posts an event and context data is saved  and micro controller goes into deep sleep.

When power resumes (say within few seconds), both GPIO pin are pulled low,  Interrupt handler of the second GPIO  should kick in and the sysctlreset should be called.  

 I am seeing the interrupt for power fail.   I am not seeing the second interrupt (falling edge) for power resume.  

Can micro-controller  wake up from deep sleep on a falling edge interrupt?  Does deep sleep wake only on raising edge or LVL_HIGH interrupts

TIA

Narendra

TIA

Narendra

 

 

  • Narendra,
    I have not yet implemented deep sleep, but maybe a couple of questions will help you solve/test it:
    - I would assume that, at the deepest sleep level, the MCU does not respond to GPIO interrupts - did you check that on the datasheet?
    - There is a pin called #WAKE, that is used for waking the processor on a falling edge - can you divert your signal to reach that pin as well?
    Curious to know: where are you saving you context? Tiva's EEPROM? You have a reasonable supercap there to be able to do it! Does your supercap guarantees energy for the MCU during the rest of the deep sleep period as well?
    Regards
    Bruno
  • Any properly configured interrupt can bring the device out of deep sleep mode. You must make sure the GPIO module used to generate the wakeup interrupt has a clock enabled in deep sleep mode by setting the appropriate bit in the DCGCGPIO (General-Purpose Input/Output Deep-Sleep Mode Clock Gating Control register, offset 0x808).
  • Hi Bob,

    This post may be resolved but as i am not getting any response on a post that i recently created, regarding deep sleep issues with USB and PWM, i am posting my queries on this thread in a hope to get any answer .

    I am using deep sleep and it is working fine with GPIO interrupt. But i am unable to get it to work with USB. Detailed below are the configurations that i am doing in my TI RTOS based project(TM4C129XNCZAD)

    1- Run time clock, with PLL and 25 MHz MOSC, is 60 MHz.
    2- Deep sleep clock source is MOSC.
    3- USB is enabled in deep sleep and clock gating is also enabled.
    4- A HAL timer module is configured for 10 seconds interrupt to wake the MCU from deep sleep.
    5- GPIO port to be used with button is also enabled in deep sleep.

    I have configured my application to only go into deep sleep when USB suspend event has been received. The problem is when i put my instrument to deep sleep(for 10 seconds), it either wakes up on button push or timer interrupt. Connecting the USB cable to PC does not causes it to wake up from deep sleep. Please let me know what am i missing which is causing the USB to not wake the MCU from deep sleep.

    Thanks,
    Muhammad Shuaib