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.

CC2340R5: Device is not wake from sleep after Button press

Part Number: CC2340R5

Tool/software:

Hi,

I'm using CC2340R5 device in that our device is going in to sleep mode & it is consuming less current but we are not unable to wake from sleep after button press.

As of now for wakeup we needs to do power on reset( i.e not expected).

for sleep mode i'm using below function:

 Power_sleep(0);  //  go to sleep mode 

when button press device is not wakeup what will be the problem please let me know.

button setting providing below:

please check the setting is ok or not and let me know.

Thanks, and regards

Balaji Wankhede

  • Hello Balaji,

    I would recommend following what the "gpioshutdown" example in our SDK (C:\ti\simplelink_lowpower_f3_sdk_8_40_02_01\examples\rtos\LP_EM_CC2340R5\drivers) does, as that clearly shows how to setup, shutdown, and wakeup. 

    (*make sure you release latches on wakeup, as that is important) 

    Thanks,
    Alex F

  • Hello Alex,

    thanks for response.

    Thank you for your response.

    I have tried the gpioshutdown example, but it requires a separate button for wakeup. This is not feasible for our device because we need to use a single button for both short press and long press functionality using button callbacks.

    Ideally, when the button is pressed, the device should wake up and also execute the button callback function. However, this kind of functionality is not working as expected. The current setup requires a separate button for setting the callback, which we would prefer to avoid.

    We have configured the button as an input GPIO with wake-up capability using the following line:

    GPIO_setConfig(CONFIG_GPIO_SW1_INPUT, GPIO_CFG_IN_PU | GPIO_CFG_SHUTDOWN_WAKE_LOW);

    Could you please guide us on how to wake up from shutdown and also use button callbacks with the same button press? If possible, please share the correct configuration and any example code to achieve this.

    We appreciate your help with this issue.

    Thanks, and regards

    Balaji Wankhede

  • Hi,

    There should be a way to detect to wake up from shutdown mode.

    -kel

  • Hello Markel,

    You would use power register notify function to tell if the device has woken up from shutdown.

    Thanks,
    Alex F

  • Hello Balaji Wankhede,

    The "buttonled" driver example project in our F3 SDK shows how to setup a button with long press, double-click, or clicked. In this case you would setup the button event to do your target event, with that being said right before the device goes into shutdown you may need to reconfigure the button to wake up on rising or falling edge, so it wakes up easier. 

    Thanks,
    Alex F

  • hello Alex,

    thanks for your response.

    but how to use it.

    Thans and regards

    Balaji W

  • Hello Balaji,

    You would import the project into your workspace, and modify the button event to do your desired application output. You can read the README of the driver project for more info. 

    Thanks,
    Alex F 

  • Hi Balaji,

    One push button implementation should work. I have done it with other TI BLE MCU.

    -kel