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.

CC3220SF: GPIO wakeup in LPDS mode

Part Number: CC3220SF
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I configured the sysconfig to below and sent the MCU to sleep with all other tasks blocked. the MCU is going to LPDS mode as expected and wake up after the sleep() has expired. I want to know how can I wake the MCU using GPIO interrupt. I generate an interrupt on GPIO13 but it does not wakeup. Is there anything I have to do to get it to wake from GPIO interrupt?

Below is my Sysconfig configuration.

  • Hi Kristin,

    What is your application doing on wake up? If you're application doesn't have a task to perform on wake up the MCU will go right back to sleep. Try testing this by adding an LPDS function and toggling a GPIO. Make sure you call GPIO_init in case you haven't already.

    Jesu

  • Jesu,

    I am turning OFF a LED before calling sleep() and turning ON the same LED after the sleep(). I have checked the "Keep Debug Active During LPDS" while testing my application and added a breakpoint just after the sleep() where I turn the LED ON. When I generate an interrupt on GPIO13 the breakpoint won't hit immediately but will hit after the sleep timer has expired.

    below is the code snippet for the same.

    GPIO_write(RED_LED,GPIO_LOW);
    sleep(15);
    GPIO_write(RED_LED,GPIO_HIGH);

  • I believe you have to register a wake up function for LPDS GPIO wake up. I just tested this and it works. Keep in mind the wake ups will run separately. For example if you have a thread sleeping for 10 seconds and you trigger a GPIO wake up somewhere in between, it execute that wake up function then go back to sleep and still wake up when the 10 seconds are up.

    -Jesus

  • Hi Jesu,

    If the MCU wakes up because of GPIO and goes back to LPDS before the timer has expired I dont want the timer to wake the MCU again. Can I use semaphore with time as an argument instead of sleep(), so that I can post the semaphore when it wakes up from GPIO and it doesn't have to wake up again?

    an example of the semaphore would be

    //SemaphoreP_pend(LPDSHandlerSem, 10*32768);

    can something like this doable?

  • Hi Kristin,

    Yes I would recommend that approach.

    Jesu