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.

CC1352P: Configure wakeup (from shutdown) on pin stopped working on SimpleLink SDK 5.30.01.01

Part Number: CC1352P

Hi,

We developed a custom board based on  CC1352P.

Wakeup ( from shutdown) on pin trigger worked perfectly till SimpleLInk SDK 5.20.00.52.

After upgrading to SimpleLInk SDK 5.30.01.01, Wakeup from GPIO trigger is not working.

Source Code :

/* Wake-up Button pin table */
PIN_Config ButtonTableWakeUp[] = {
CONFIG_GPIO_BTN1 | PIN_INPUT_EN | PINCC26XX_NOPULL | PINCC26XX_WAKEUP_POSEDGE,
PIN_TERMINATE /* Terminate list */
};

...

...


/* Configure DIO for wake up from shutdown */
PINCC26XX_setWakeup(ButtonTableWakeUp);

/* Go to shutdown */
Power_shutdown(0, 0);

  • Hi Amit,

    This is most likely caused because in SDK 5.30 the PIN driver and the GPIO driver were merged, and a new GPIO++ driver was included. This is why in the SDK release, you can't find the pin-related examples (i.e., pinInterrupt, pinShutdown, pinStandby) that were there in SDK 5.20.

    https://software-dl.ti.com/simplelink/esd/simplelink_cc13xx_cc26xx_sdk/5.30.01.01/exports/changelog.html

    https://sir.ext.ti.com/jira/browse/EXT_EP-10550

    Having said this, the GPIO++ driver should allow you to do the same thing, but this might require some work from your side.

    I checked and I couldn't find any examples or code snippets in the documentation that directly fit the pinShutdown example, but the documentation for the driver should give you a good starting point.

    https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_5_30_01_01/docs/drivers/doxygen/html/_g_p_i_o_8h.html

    BR,
    Andres

  • Hi Andreas,

    Thanks for the above info.

    I'm familiar with the new GPIO++ driver, migrating to SDK 5.30 required some code modification on our project.

    Went over GPIO documentation, there is no reference to waking up from shutdown.

    Tried to modify code , for example  :

    GPIO_setInterruptConfig(CONFIG_GPIO_BTN1, GPIO_CFG_IN_NOPULL | GPIO_CFG_IN_INT_RISING | GPIO_CFG_INT_ENABLE);

    /* Go to shutdown */
    Power_shutdown(0, 0);

    But it does not work.

    Wake-up from shutdown via GPIO is essential for battery saving.

  • Hi Amit,

    I'll try to set some time and work on this to see if there is a relatively straightforward way to get the same functionality using the GPIO++ driver. I'll get back to you once I have something.

    BR,
    Andres

  • Hi Andreas,

    Any update?

    BR,

    Amit

  • Hi Amit,

    There is an API in the PIN driver that does not have an equivalent implementation in the GPIO++. That's what causes this migration issue. It will be added in a future SDK release along with the example.

    Having said this. Since the PIN driver is still available in this release, it should be safe to use it. Alternatively, you can look at what the PIN driver API does, and then add an equivalent API to the GPIO++ driver. This shouldn't require a lot of work.

    Take a look at the PINCC26XX_setWakeup() API in simplelink_cc13xx_cc26xx_sdk_5_30_01_01\source\ti\drivers\pin\.

    BR,
    Andres

  • Hi Andreas,

    As suggested, since PIN driver is still available in this release, calling PINCC26XX_setWakeup() should work, however, it is not working for some reason on SDK 5.30.01.01.

    Compared IOC register used for wakeup configuration  ( IOCFG27) after PINCC26XX_setWakeup() is executed, and its value is identical on SDK 5.30 and SDK 5.20.

    Also, Confirmed the device is actually switching to shutdown mode by registring power notification callback ( Power_registerNotify()) with PowerCC26XX_ENTERING_SHUTDOWN event. 

  • Hi Amit,

    Just to make sure that I understood correctly, "copying" the pinShutdown example from SDK 5.20 to SDK 5.30 does not work? Or how are migrating the code from one SDK to another?

    How can I reproduce what you are seeing?

    BR,
    Andres

  • Hi Andreas,

    I have managed to make my custom board code work with SDK 5.30 using PIN driver initialization. This was the missing part to make it work with SDK 3.50

    // Declaration to avoid link error 

    const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
    .intPriority = (~0),
    .swiPriority = 0
    };

    const PIN_Config BoardGpioInitTable[1 + 1] = {
    CONFIG_GPIO_BTN1 | PIN_INPUT_EN | PIN_NOPULL | PIN_IRQ_DIS,
    PIN_TERMINATE
    };

    /* ==== /ti/drivers/PIN initialization ==== */
    if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) {
    /* Error with PIN_init */
    while (1);
    }

    /* Call driver init functions */
    Board_init();

    Of course, I will use it as a temporary workaround till wakeup from shutdown API  will be added to GPIO++ driver in a future SDK release.