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.

CC2652R: enter ble into standby mode and wake up using RTC

Part Number: CC2652R
Other Parts Discussed in Thread: ENERGYTRACE

Hello,

I am using TI ble cc2652R on custom board. currently I'm using simple_peripheral example code which I have modified in terms of application.

Now with modified code the current consumption of board is coming 3mA so I want to enter the ble into standby mode and then wakeup the ble after sometime can you please suggest what are the steps to enter standby mode and then wake up ble using RTC.

  • In my application I want the ble to be connected and when there is no data transmission on ble it should go to sleep and when data is received on ble it should wakeup. for implementing this in my application which power API I should call please suggest.

  • Hello chaitali,

    Support has already been provided in your previous E2E thread.  The simple_peripheral example is designed by Power Management to enter standby mode and wakeup on Bluetooth radio reception as you've described once POWER_SAVING is defined.  RTC operation and power APIs will not help the matter if the issue resides in your code changes (blocking the idle task from running for instance) or custom hardware (also power measurement tools).  You need to evaluate your power consumption with a simple gpiostandby example to confirm that you can accomplish the expected 1 uA with your hardware and tools before continuing with BLE development.

    Regards,
    Ryan

  • Hello,

    I have now taken example code of simple peripheral and only added one task which is running in 100ms periodicity. As you have suggested ble stack takes care of power management so I am not adding any power API's,

    But the ble is not going to sleep as my task keeps on running can you suggest a way to make the task idle so that ble will enter standby mode.

  • First, evaluate the simple peripheral example with POWER_SAVING defined and no other code changes.  Only after confirming that this produces the expected power consumption should you move towards adding a task.  Make sure that it can be suspended properly, and use the BLE-5 Stack Debugging Guide to help you use the debugger ROV and EnergyTrace modules to further evaluate your runtime task operation. 

    Regards,
    Ryan

  • Hello ,

    I have tested the simple peripheral basic code without any changes on TI launchpad , it produces expected current consumption.

    As you mentioned before I'm trying to add one by one my application code it is observed when I add my application code with UART the current consumption is coming as 1.6mA which is more than usual please note I am testing this on TI launchpad only. Is there any way I can still reduce current. 

  • The device is not allowed to enter standby if the UART is expecting to receive data.  You can either use the Display driver (TX only) or disable/close the UART peripheral before entering standby.  You can use another GPIO pin to wake the SimpleLink device when data is ready to be transferred.

    Regards,
    Ryan

  • Hello ,

    so I will close the uart but when exactly device go into standby mode , where exactly I have to close the uart.

  • Hi,

    Use UART_close to close the UART peripheral. This should be done when your application no longer requires UART.

    The Power Manager will automatically enter the lowest power state.

    Thanks,
    Toby

  • I have called uart_close() when uart is no longer needed. I am able to achieve current less than 1mA and ble goes to sleep but when i sent some data over ble it is supposed to be sent through uart again that time I am suppose to open uart again?

  • You will need to re-open the UART module when you expect to send data through UART again.

    Regards,
    Ryan

  • Hello,

    So I have closed the uart when my device enters into sleep mode and expected current consumption is achieved but for waking up the device I am sending one frame on ble after which device should wake up this frame I am further trying to send through uart  to another microcontroller .so I am calling uart_open function again in one callback function where I receive data on ble but the ble frame is not sending even if I open uart again so how i can send data again on ble ?

  • UART and BLE operations are not inherently associated so at this moment it is not clear what is preventing the radio from working as expected.  You should review your setup of sleep control as the device should be allowed to enter standby when in idle mode (no task activity) and further debug your application to further determine what happens when data is trying to be sent.

    Regards,
    Ryan

  • The ble data is coming but in my application I have to send the received ble frame through uart to another microcontroller so once i close uart and afterwards data is received on ble it is not further sending through uart to other microcontroller. there is some issue I am facing with uart .

    I am just calling uart_open() after I receive the data on ble Is there anything else also I have to call to start uart functioning again.

  • Closing the UART cancels any pre-existing prepared UART communication.  You have to wait until the UART is finished before closing the module.  Once the UART is opened again you must continue using UART write functions to send data through this peripheral.

    Regards,
    Ryan