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.

HALT wake up issue

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

I'm using the microcontroller TMS320F28062PZPS.

I can put the microcontroller into the halt mode.

I would like to wake it with GPIO 15, but I can't. It seems that upon wakeup the watchdog resets the microcontroller. If I disable the watchdog, the microcontroller freezes.

The code is the following:

/*GPIO 15 setup*/

    GpioCtrlRegs.GPAMUX1.bit.GPIO15 = (0U);
    GpioCtrlRegs.GPADIR.bit.GPIO15 = (0U);

    GpioCtrlRegs.GPAPUD.bit.GPIO15 = 0;
    GpioIntRegs.GPIOLPMSEL.bit.GPIO15 = 1;

/*HALT routine*/

    if (test_halt == 555)                     /*check for external halt command*/
    {

        // Write the LPM code value
            EALLOW;
            if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 1) // Only enter low power mode when PLL is not in limp mode.
            {
              SysCtrlRegs.LPMCR0.bit.LPM = 0x0002;   // LPM mode = Halt
              test_halt = 0;                   /*reset the halt command*/
            }
            EDIS;

        // Force device into HALT
        __asm(" IDLE");                           // Device waits in IDLE until falling edge on GPIO15 pin wakes device from halt mode.
                                            
            for(;;){}                                // Loop here after wake-up.
    }

Thanks

Andrej

  • Andrej,

    Have you followed the Example_2806xHaltWake example in ControlSuite?
    Have you configured the LPM wake interrupt in code that is not shown?

    Can you share an oscilloscope shot of your wakeup pulse?

    Thanks,
    Mark
  • Hi Mark,

    yes, I have followed the Example_2806xHaltWake.c .

    First I have tried without configuring the interrupt, because in my application I need only to lower the power consumption at minimum. And I don't need any special activity upon wake up.

    Then I have also tried with activating the interrupt (same as in example file), but the result was the same.

    I can try again with the interrupt to see, if the output is triggered.

    Thanks,

    Andrej

  • Andrej,

    Please ensure that your wake-up pulse is both held low for long enough time, and also is clean. It is possible that a very noisy wake pulse may not wake the device.

    -Mark

  • Mark,

    thanks for your help.

    I have configured the same interrupt as in Example_2806xHaltWake.c. The only difference is, that in the interrupt I force GPIO23 to a High state.

    So the response is the following:

    1. At startup I connect GPIO15 (wake up input) to Hi.

    2. When processor is running, the GPIO23 (marker output) is Low.

    3. I execute the command test_sleep = 555. The microcontroller goes in halt mode - the current cunsumption lowers.

    4. I pull the GPIO15 to Low. Nothing happens, the microncontroller is still in halt mode (low current consumption, GPIO23 is still Low )

    5. I reconnect GPIO15 to Hi, the power cunsumption raises again and GPIO23 goes to Hi. This means, that the microcontroller was waked up, and the interrupt was triggered too. But microcontroller is FROZEN (if I have watchdog switched on, it resets).

    If I omit the first step (I leave GPIO15 to Lo) it happens the following:

    I execute command test_sleep = 555.

    It seems, that the microcontroller goes into halt mode and then soon exits halt mode: The GPIO23 is Hi and the microcontroller is FROZEN (if I have watchdog switched on, it resets).

    What else can I do ?

    Thanks and best regards

    Andrej

  • Andrej,

    What is your low pulse duration of the Wake GPIO?

    -Mark