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