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.

tm4c123 deep sleep wake from gpio pin interrupt



Hi

1 entering deep sleep mode by calling SysCtlDeepSleep();

2 try to wake up by getting interrupt from GPIO pin

if the definition is   GPIOIntTypeSet(GPIO_PORTA_BASE, EMERGENCY_SWITCH,GPIO_BOTH_EDGES); dosn't wake up

but if the definition is   GPIOIntTypeSet(GPIO_PORTA_BASE, EMERGENCY_SWITCH,GPIO_LOW_LEVEL); wakes up all the time

thanks

  • Hello Zahiz,

    My first question is if you are using this as a wakeup, why would you want to trigger an interrupt on both edges? Are you also triggering the deep sleep mode entry based on both edges of the same button? If his is the case you may simply be re-entering deep sleep. to get a better idea of what might be happening, it would be ideal to get a scope shot of the button input signal for both cases along with deep sleep entry and exit (add a GIO signal to indicate when in full operating mode vs. in deep sleep).
  • Hi
    the work around of wakeup from level then change it to both edges works
    just wondring way need to use this workaround.
    the input from the button is clean pulse width of 1 second

    thanks
    Zahi
  • Hello Zahi,

    Have you checked that the interrupt is firing on both edges apart from the wakeup? In other words, can you bypass the sleep code and just see if the interrupt is triggered on both edges of the button press by toggling an IO or something of this sort in the ISR? Also, check to make sure you are clearing the interrupt flag before entering deep sleep since it might get set inadvertently during initialization.