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.

RTOS/CC2640: Put the cc2640 in standby mode with RTC running and wakeup the device on pin interrupt

Part Number: CC2640


Tool/software: TI-RTOS

I am developing a device which has following requirements using CC2640:

1.RTC should run always unless the battery is empty.

2.I want to put the device in standby mode when the button is pressed and wakeup from standby mode on detecting the pin interrupt from the same button.

3.The device should consume lowest power possible since battery should last longer.

I started with shutdown mode example and its working fine but RTC doesn't work in shutdown mode.but there is problem in putting the device in standby mode it doesn't wakeup from standby mode. i am using following api's Power_shutdown(NULL,0) which works fine but Power_sleep() doesn't work i searched for the example on standby mode but task_sleep function is used in that example instead of Power_sleep() function .from the technical reference manual i found that device consume low power in standby mode and RTC also works in standby mode.So I want to know whether this controller meets my requirement.If yes how can i achieve that is there any example for putting the device in standby mode and waking up on interrupt.I have removed POWER_SAVE from predefined symbol since i want my device to advertise continuously when my device is on.

  • Hi Sharath,

    It sounds like you are running the BLE Stack, is that correct? If so, you need the POWER_SAVE define for TI-RTOS to enter Standby. With this defined, the operating system will automatically go to the lowest allowable power mode. If you are continuously advertising for example, the device will go to Standby between the advertisement events.

    Cheers,
    Fredrik
  • Hi Fredrik,

    Thanks for your reply.I am uing BLE stack.If i define POWER_SAVE i had observed in my previous project that device stops advertising after a certain time. In order to resolve that I commented POWER_SAVING after removing POWER_SAVE define that problem got resolved. so my observationis device is not discoverable from my APP after some time if POWER_SAVE is defined.So is it necessary that i need to define POWER_SAVE to put the device in standbymode also i don't want the rtos to do it automatically. I want to do it manually what is the possible solution for me.

  • Hi ,
    any update guys am I doing anything wrong here by undefining POWER_SAVE . was my observation that if i define POWER_SAVE that device stops advertising is true is there anything else that can be done to advertise continuously with POWER_SAVE defined.
    1. yes I am using BLE SDK 2.2.1 and I want device to advertise continuously.
    2.I am using RTC which doesn't work which doesn't work in shutdown mode.

    3. Is it impossible to put CC2640 in standby mode manually and wakeup on pin interrupt manually.please give me a clear answer from TI is it Possible or Impossible.

  • Hi Sharath,

    Refer to the BLE Software Developer's Guide for details on advertising.

    Cheers,
    Fredrik
  • Hi Fredrik ,
    Thanks for the suggestion.I have studied the BLE software developers guide.These are the summary of my observations-
    1. Device can only be put in shutdown mode and standby mode is not supported.
    2.It is not possible to put CC2640 in standby mode manually and wake-up on pin interrupt manually.Working around with power policy is little bit complex and also it wont work.
    3.you can either use TASK_SLEEP or semaphore_pend() to put the device in idle mode.
    4. There is a issue with BLE stack implementation because of which device stops advertising after some time. undefining POWER_SAVE is one method to solve this and the other method is re-advertising every 30 minutes. You can use the patch provided by TI for this purpose.I think re-advertising is the preferred method.