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.

Waking up from Sleep Mode

Hello,

My fellow colleague was messing around with the Stellaris and accidentally left the LM4F120 Launchpad in sleep mode. The current draw is that of 9mA which is the average we were getting when it was entering sleep mode. We've been reading of solutions regarding the LM Flash Programmer and the Unlock Sequence, but apparently this doesn't work with the LM4F120. We get the Cannot find target device, and it constantly freezes in the Assert and Hold Reset button, respectively.

When pressing the Reset button current draw drops to 4.5mA which is weird, we've also tried programming the launchpad with code composer while holding down reset but we keep getting frequency out of range. 

Is there any other way that we can attempt to unlock it?

Thanks, 

  • Just posting the code my colleague is working on. He says it used to work perfectly before he added the IntDisable(INT_GPIOA);, IntMasterDisable(); in the gpioAhandler. It has very weird behavior because we connect a high into the Port A2 and it doesn't do anything. But, when we connect the cables to measure the current draw, the LED turns on but current draw remains in ~9mA. Thats the behavior that is supposed to wake up the MCU from sleep, but it isn't doing that now. Any thoughts would be helpful as we are currently stuck trying to find a way to wake up the MCU.
    Thanks,
    #include "inc/hw_ints.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/gpio.h"
    #include "driverlib/timer.h"
    int main(void)
    {
    //unsigned long ulPeriod;
    SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
    //declaracion
    GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
    GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,GPIO_PIN_2);
    SysCtlPeripheralClockGating(1);
    SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOA|SYSCTL_PERIPH_GPIOF);
    //interrupts
    GPIOPinIntClear(GPIO_PORTA_BASE,GPIO_PIN_2);
    GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_HIGH_LEVEL);
    GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2);
    IntEnable(INT_GPIOA);
    //SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    //TimerConfigure(TIMER0_BASE, TIMER_CFG_32_BIT_PER);
    //ulPeriod = (SysCtlClockGet() / 10) / 2;
    //TimerLoadSet(TIMER0_BASE, TIMER_A, ulPeriod -1);
    //IntEnable(INT_TIMER0A);
    //TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    IntMasterEnable();
    SysCtlSleep();
    //TimerEnable(TIMER0_BASE, TIMER_A);
    while(1)
    {
    }
    }
    void gpioAHandler(void)
    {
    // Clear the timer interrupt
    GPIOPinIntClear(GPIO_PORTA_BASE,GPIO_PIN_2);
    //TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    // Read the current state of the GPIO pin and
    // write back the opposite state
    if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_2))
    {
    GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 0);
    }
    else
    {
    GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 4);
    }
    IntDisable(INT_GPIOA);
    IntMasterDisable();
    }
    startup
    extern void gpioAHandler(void);
    --------------------
    IntDefaultHandler,                      // Debug monitor handler
        0,                                      // Reserved
        IntDefaultHandler,                      // The PendSV handler
        IntDefaultHandler,                      // The SysTick handler
        gpioAHandler,                      // GPIO Port A
        IntDefaultHandler,                      // GPIO Port B
  • Hi Hector,

    Have you verified you are using the most current version of LMflash and that your ICDI firmware is the most current? 

    The screen capture below is the process you should use to Unlock the part. Make sure that you have selected Blizzard Class. Follow all on screen instructions while doing the unlock process.

    Let me know if that helps,

    Sheldon

  • Hello, 

    Tried this a couple of times, amongst other things to get the Launchpad to wake up but nothing worked. Something weird did happen since when I read the current draw of the device I continually get ~17-18mA which is normal current draw in run mode, yet I still can't program anything into the device, neither with LM Flash Programmer or Code Composer. We are beginning to believe we accidentally burned the launchpad or something because whenever I go to measure current draw (touch the two pins with the multimeter) the Blue LED that was programmed to turn on when in sleep mode turns on yet current draw maintains at a steady 17-18mA. If you remove the pins and connect them again the LED will turn off and current draw remains unchanged yet again. If you have any idea of what may be wrong then help is appreciated, at the moment we are assuming we damaged it somehow. 

    Thanks,