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.

TM4C1294NCPDT: 3ca32tw

Part Number: TM4C1294NCPDT

hello ,

I am working on deep sleep mode  .I want to wake from deep sleep using hibernation wake pin.Is it possible ??

if possible ,tell me how it can be configured to wake from deep sleep ??

  • Hi Devendra,

     Please refer to the datasheet for details. Below is the excerpt. Please refer to the sleep_modes and hibernate examples in TivaWare library under <TivaWare_Installation>\examples\boards\ek_tm4c1294xl\

  • May we ask "from where did "3ca32tw" arise" - and what - if any - was its value in a "meaningless Subject Line?"
  • This is the function created  to enter into deep sleep mode but then also wake pin is not working Gpio pin is working but not every time ,sometime it works and  sometime not.

    void going_to_sleep()

    {

         sleep_init();

        // Enable Auto Clock Gating Control.

                SysCtlPeripheralClockGating(true);

    // Set LDO to 0.90V in Deep-Sleep.

    SysCtlLDODeepSleepSet(SYSCTL_LDO_0_90V);

    // Set Flash & SRAM to Low Power in Deep-Sleep Mode.

    SysCtlDeepSleepPowerSet(SYSCTL_FLASH_LOW_POWER | SYSCTL_SRAM_LOW_POWER);

    #if(DEBUG)

    {

    DEBUG_PRINT_TIME();

    DEBUG_PRINT((uint8_t *)"\t\t");

    DEBUG_PRINT((uint8_t *)"Going to Sleep ");

    DEBUG_PRINT((uint8_t *)"\r\n");

    }

      #endif

    delay1(10);

    led_on();

    while(GPIOPinRead(GPIO_PORTE_BASE,GPIO_PIN_2)==GPIO_PIN_2);  // Waits until camera is powered OFF

    delay1(10);

    SysCtlDeepSleep();

    while(1)

    {

    #if(DEBUG)

    {

    DEBUG_PRINT_TIME();

    DEBUG_PRINT((uint8_t *)"\t\t");

    DEBUG_PRINT((uint8_t *)"Not entered in deep sleep mode ");

    DEBUG_PRINT((uint8_t *)"\r\n");

    }

      #endif

    }

    }

    ********************************************

    here i am initiated deep sleep mode

    void  sleep_init()

    {

             SysCtlDeepSleepClockConfigSet(1, (SYSCTL_DSLP_OSC_INT | SYSCTL_DSLP_PIOSC_PD | SYSCTL_DSLP_OSC_EXT32 ));

     HibernateIntClear(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_WR_COMPLETE | HIBERNATE_INT_RESET_WAKE);

    SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_GPIOE);

          SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_GPIOD);

    SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_UART3);

    SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_HIBERNATE);

           HibernateEnableExpClk(freq);

    HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);

    HibernateRTCEnable();

     SysCtlPeripheralDeepSleepDisable( SYSCTL_PERIPH_ADC0   | SYSCTL_PERIPH_ADC1  |  SYSCTL_PERIPH_CAN0    | SYSCTL_PERIPH_CAN1      |

                          SYSCTL_PERIPH_CCM0    | SYSCTL_PERIPH_COMP0     |  SYSCTL_PERIPH_EEPROM0 | SYSCTL_PERIPH_EMAC0     |

                          SYSCTL_PERIPH_EPHY0   | SYSCTL_PERIPH_EPI0      |  SYSCTL_PERIPH_GPIOA   | SYSCTL_PERIPH_GPIOB     |

                          SYSCTL_PERIPH_GPIOC   | SYSCTL_PERIPH_GPIOF     | SYSCTL_PERIPH_GPIOG    | SYSCTL_PERIPH_GPIOH     |  

    SYSCTL_PERIPH_GPIOJ   | SYSCTL_PERIPH_GPIOK     | SYSCTL_PERIPH_GPIOL    | SYSCTL_PERIPH_GPIOM     |

                        SYSCTL_PERIPH_GPION   | SYSCTL_PERIPH_GPIOR     | SYSCTL_PERIPH_GPIOS    |  SYSCTL_PERIPH_WTIMER4  |

                          SYSCTL_PERIPH_GPIOT   | SYSCTL_PERIPH_I2C0      | SYSCTL_PERIPH_I2C2     | SYSCTL_PERIPH_I2C3      |

                          SYSCTL_PERIPH_I2C4    | SYSCTL_PERIPH_I2C5      | SYSCTL_PERIPH_I2C6     | SYSCTL_PERIPH_I2C7      |

                          SYSCTL_PERIPH_I2C8    | SYSCTL_PERIPH_I2C9      | SYSCTL_PERIPH_LCD0     | SYSCTL_PERIPH_ONEWIRE0  |

                          SYSCTL_PERIPH_PWM0    | SYSCTL_PERIPH_PWM1      | SYSCTL_PERIPH_QEI0     | SYSCTL_PERIPH_QEI1      |

                          SYSCTL_PERIPH_SSI0    | SYSCTL_PERIPH_SSI1      | SYSCTL_PERIPH_SSI2     | SYSCTL_PERIPH_SSI3      |

                          SYSCTL_PERIPH_TIMER0  | SYSCTL_PERIPH_TIMER1    | SYSCTL_PERIPH_TIMER2   | SYSCTL_PERIPH_TIMER3    |

                          SYSCTL_PERIPH_TIMER4  | SYSCTL_PERIPH_TIMER5    | SYSCTL_PERIPH_TIMER6   | SYSCTL_PERIPH_TIMER7    |

                          SYSCTL_PERIPH_UART0   | SYSCTL_PERIPH_UART1     | SYSCTL_PERIPH_UART2    | SYSCTL_PERIPH_UART4     |

                          SYSCTL_PERIPH_UART5   | SYSCTL_PERIPH_UART6     | SYSCTL_PERIPH_UART7    |  SYSCTL_PERIPH_UDMA     |

    SYSCTL_PERIPH_USB0    | SYSCTL_PERIPH_WDOG0     | SYSCTL_PERIPH_WDOG1    | SYSCTL_PERIPH_WTIMER0   |

    SYSCTL_PERIPH_WTIMER1 | SYSCTL_PERIPH_WTIMER2   | SYSCTL_PERIPH_WTIMER3  | SYSCTL_PERIPH_WTIMER5 );

    ptr_wake_up=ButtonIntHandler;

    HibernateWakeSet( HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC | HIBERNATE_WAKE_RESET );

    HibernateIntEnable(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RESET_WAKE);

    HibernateIntRegister(ptr_wake_up );

     GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_2);

    GPIOIntClear(GPIO_PORTE_BASE,GPIO_INT_PIN_2);

    // GPIODirModeSet(GPIO_PORTE_BASE, GPIO_PIN_2,GPIO_DIR_MODE_IN);

    // GPIOPadConfigSet(GPIO_PORTE_BASE, GPIO_PIN_2,GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_WAKE_HIGH);

    GPIOIntTypeSet(GPIO_PORTE_BASE, GPIO_PIN_2,GPIO_HIGH_LEVEL);

     GPIOIntRegister(GPIO_PORTE_BASE,ptr_wake_up);

    GPIOIntEnable(GPIO_PORTE_BASE,GPIO_INT_PIN_2);

    IntMasterEnable();

    }

    ************************************************************

    This is my Interrupt handler  :-

    void ButtonIntHandler()

    {

       // Delay here on button push for simple debouncing.

       delay1(1);

     static uint32_t status1,Status;

    Status = HibernateIntStatus(0);

    if(1 == Status)

    {

    HibernateIntClear(Status);

    }

      status1=GPIOIntStatus(GPIO_PORTE_BASE,0);

     if(1 == status1 )

    {

    GPIOIntClear(GPIO_PORTE_BASE,status1); // Clear the interrupts

    }

     led_on();

     flag=1;

    wakeup_flag=0;

    wakeup_handle = 1;

     #if(DEBUG)

    {

    DEBUG_PRINT_TIME();

    DEBUG_PRINT((uint8_t *)"\t\t");

    DEBUG_PRINT((uint8_t *)"Wake from deep sleep ");

    DEBUG_PRINT((uint8_t *)"\r\n");

    }

      #endif

       IntMasterEnable();

     work_to_done();  

    }

  • Hi,

    When I look at the TivaWare sleep_modes example, it does not configure anything related to hibernate mode. In another word, I don't see any API related to hibernate getting used. However, in your code, even as you stated your intention was to enter/exit deepsleep mode, I see you r code with many configurations related to hibernate. to isolate the problem, can you look at the sleep_modes example again and configure your code only to enter/exit deepsleep and not mixing with the hibernate mode?
  • hi

    Thanks for previous suggestion!

    I am entering into deep sleep mode but for exit purpose i want to use WAKE pin (pin no 64) which is dedicated to hibernate .WAKE pin is working for hibernate mode but not for deep sleep mode .And as you mention in above :

    The WAKE pin can generate interrupts in Run, Sleep and Deep Sleep Mode. The events that can
    trigger an interrupt are configured by setting the appropriate bits in the Hibernation Interrupt Mask
    (HIBIM) register. Pending interrupts can be cleared by writing the corresponding bit in the Hibernation
    Interrupt Clear (HIBIC) register.

    So i want to know how to configure it for deep sleep mode.As per example i am not getting how to configured it for Deep sleep mode.

    Regards
  • cb1_mobile said:
    May we ask "from where did "3ca32tw" arise" - and what - if any - was its value in a "meaningless Subject Line?"

    There's more than one way to defeat an overly 'helpful' input form.
    Robert
  • Indeed. It is hoped that the "LIKE Destroying" forum team would expend (some) effort in, "Advising posters that their Subject (i.e. their post's Headline) is a "Key Drawing Card" - and the "repetition of the MCU's id offers, "NO/ZERO INCENTIVE" to "Click" upon so "empty" a thread!

    The addition of the cryptic "3ca xxx" - as you note - provides only further proof that "LIKE Destroyers" are WITHOUT a CLUE!