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.

GPIO wake up during LPDS

Other Parts Discussed in Thread: CC3200

hi ti friends:

1.I have some questions use example idle_profile with cc3200 LP. With this example,SW3(GPIO_13) can wake up the system. Now I want to use GPIO_17 to wake up the system ,so I add code in function
int gpio_intr_hndlr(int gpio_num)
{
unsigned char queue_msg = 2;

if((GPIO_SRC_WKUP == gpio_num)||(17 == gpio_num))
{
osi_MsgQWrite(&g_tWkupSignalQueue, &queue_msg, OSI_NO_WAIT);
}
return 0;
}
but GPIO_17 can't wake up the system.
In my option, I think add the judgement code in gpio_intr_hndlr,there is gpio in gpio_list in user_app_config.h,and config the gpio to input in pinmux.c,right?

2.About IO parking,just like cc32xx_io_park={PIN_01, "GPIO_10", WEAK_PULL_DOWN_STD}, is it means GPIO_10 will be pull down when come into LPDS? And restore after exit LPDS? thanks.

  • Bluce,

    You need to do below changes to the 'idle_profile' application for setting GPIO_17 as wake-up source:

    - In pinmux.c, add following lines to function 'PinMuxConfig'

        //
        // Configure PIN_08 for GPIOInput
        //
        MAP_PinTypeGPIO(PIN_08, PIN_MODE_0, false);
        MAP_GPIODirModeSet(GPIOA2_BASE, 0x2, GPIO_DIR_MODE_IN);

    - in main.c, add following lines instead of '#define GPIO_SRC_WKUP           GPIO_13'

    #define GPIO_17                 17
    #define GPIO_SRC_WKUP           GPIO_17

    Note: In the current silicon revision, wake up from LPDS can be triggered by only one of the wake-up pins that can be configured before entering LPDS.

    -/Praneet

  • hi Praneet:

    Thank you for your response and GPIO_17 works fine as your suggestion.

    Now I want to use GPIO_2 to wakeup,
    1.So I instead of '#define GPIO_SRC_WKUP GPIO_13' with bellow code in main.c

    #define GPIO_02 2
    #define GPIO_SRC_WKUP GPIO_02

    2.In pinmux.c, add following lines to function 'PinMuxConfig'
    MAP_PRCMPeripheralClkEnable(PRCM_GPIOA0, PRCM_RUN_MODE_CLK);
    //
    // Configure PIN_57 for UART0 UART0_RX
    //
    //MAP_PinTypeUART(PIN_57, PIN_MODE_3);
    MAP_PinTypeGPIO(PIN_57, PIN_MODE_0, false);
    MAP_GPIODirModeSet(GPIOA0_BASE, 0x4, GPIO_DIR_MODE_IN);
    3.in use_app_config.h I add
    #define GPIO_02 2
    int gpio_list[] = {
    GPIO_09,
    GPIO_13,
    GPIO_17,
    GPIO_02
    };

    but GPIO_2 can't wake up the system. I don't know why..
  • Bluce, I'd surely want to know what you intend to do by setting each of these GPIOs as wake sources, so I could address your query appropriately? Are you just testing if these GPIOs can be set as wake-up sources, or is it the need of your use-case/application?

    -/Praneet
  • Because our key INT use GPIO2 and can't wake up from LPDS. So I want to know if GPIO2 can works normal on your 3200 LP and idle_profile demo . But I can't use GPIO2 to wake on 3200 LP too. I had to test another GPIO, that is GPIO17. Now GPIO17 works fine ,but GPIO2 can't work. Please help me how to use GPIO2 to wakeup,thanks