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.

  • TI Thinks Resolved

SW-EK-LM4F232: LM4f232 stuck after hibernation

Prodigy 30 points

Replies: 5

Views: 500

Part Number: SW-EK-LM4F232

Hi,


I have a Stellaris LM4f232 evaluation board, and I cannot wake it up after putting it to hibernate.

I have tried using LM Flash Programmer to erase the flash but it says "unable to find the device". I have also tried it while pressing the reset button without any result. I am connecting the board to my computer using a mini usb cable. Also, the board does not appear in the device manager of my pc.


Appreciate any help,
Thanks

Guzman

  • Hello Guzman,

    That is an older dev kit, so I would recommend you move to one of our new TM4C LaunchPad's or DK boards as soon as possible.

    That said, I can give you some advice for your issue.

    The device can only be woken from hibernation via the WAKE_N pin. So you would need to wake the device from hibernation via that pin first, and then you should be able to program the board.

    Also here is a helpful post of how to add in a quick solution to get back to programming your device into your code for ease of use while testing the module: e2e.ti.com/.../1353568

    Best Regards,

    Ralph Jacobi

  • In reply to Ralph Jacobi:

    Hi,

    Thanks for the answer, this isn't working for me though. Should this work even if I only programmed the micro to wake on an RTC match?  (that somehow doesn't occur)

    Guzman

  • In reply to Guzman Vigliecca:

    Hello Guzman,

    If that's the case, then I'd recommend a method where you don't allow code to execute on device power up so you can prevent the device from entering hibernation mode.

    It's actually quite simple to do with EK's that have a reset button present, outlined in this post: https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/p/45751/163228#163228

    Also potentially relevant: https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/270528

    Best Regards,

    Ralph Jacobi

  • In reply to Ralph Jacobi:

    Hi, I managed to make it work by connecting it while pressing the reset button, and then erasing the flash. I don't know why my code failed though. This is it:

    void hibernate(){

    SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);

    HibernateEnableExpClk(SysCtlClockGet());
    HibernateClockSelect(HIBERNATE_CLOCK_SEL_RAW);
    HibernateRTCEnable();
    HibernateWakeSet(HIBERNATE_WAKE_RTC);
    HibernateRTCSet(0);
    HibernateRTCMatch0Set(30);

    unsigned long ulStatus = HibernateIntStatus(0);
    HibernateIntClear(ulStatus);

    unsigned long ulNVData[64];
    HibernateDataSet(ulNVData, 64);

    HibernateIntEnable(HIBERNATE_INT_RTC_MATCH_0);

    void (*p) (void);
    p=hibernateHandler;
    HibernateIntRegister(p);

    HibernateRequest();

    while(1);
    }




    And then the handler:


    void hibernateHandler(void){

    unsigned long ulStatus = HibernateIntStatus(0);
    HibernateIntClear(ulStatus);


    }



    Do you know what am I doing wrong? Thanks

  • In reply to Guzman Vigliecca:

    Hello Guzman,

    You need the following API call as well: IntEnable(INT_HIBERNATE);

    Best Regards,

    Ralph Jacobi

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.