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.

What is the TI's API function to put cc2640 into standby?

Other Parts Discussed in Thread: CC2640, CC2650STK

Hi, I am using cc2640 5mm x 5mm package with CCS(code composer studio), based on sample project "SimpleBLEPeriphral".

Goal: To reduce power by putting cc2640 into standby mode(Not advertising, not connected), I also want the API to wakeup cc2640 to advertising mode from standby mode.

Can anyone give me the 2 APIs? Thank you.

  • Hi,

    In SimpleBLEPeripheral, it's already running like the way you want. TI-RTOS will put the devices into standby if there is nothing happening, which means when you are not advertising not connected, just idle. The device will automatically enters standby. When the device needs to advertising, it will automatically wakeup.

    Everything you want are already taken care in TI-RTOS. Take a look at appBLE.cfg.

    You can see that when the CPU is in IDLE, standbyPolicy is in use. 

    /* Idle CPU when threads blocked waiting for an interrupt */
    Power.idle = true;
    Power.policyFunc = Power.standbyPolicy;

  • Thank you. I will take a look and test it.
  • I have checked appBLE.cfg, it indeed has taken care of most power issues. However, my customized board's main current is 2.8mA during advertising mode, 3.1mA during connected mode, which is higher than my expectation. According to TI's documents, www.ti.com/.../swra478.pdf , on page 19, the standby mode should consume only 2uA. But my board consumes 3mA when it is connected to a mobile phone, even when it has nothing to send or receive. What I want is that the board goes to sleep when it has nothing to send, then wake up after certain interval(e.g.10s) to check if it should receive or send anything. But what SimpleBLEPeripheral is doing is that once it is connected to mobile phone, it always consumes 3mA even if it has nothing to send or receive. Can anyone solve this problem? Thanks.
    My measurement is accurate because the board mainly contains cc2640, no other high power stuff.
  • Hi,

    We have done the measurement multiple times and even with device is advertising with 100ms advertising interval, the average current is less than 200uA. have you followed our reference design? It sounds to me that your device does not go into sleep at all. Is your 32kHz crystal soldered properly?
    Have you checked our wiki page for HW troubleshooting?
    processors.wiki.ti.com/.../CC26xx_HW_Checklist
    processors.wiki.ti.com/.../CC26xx_HW_Troubleshooting

    What you can try is in SimpleBLEPeripheral project, main.c

    comment out everything except
    /* enable interrupts and start SYS/BIOS */
    BIOS_start();

    Then since there is no task initialized, device will stay in standby forever, then just measure the current. If you are not able to measure around 1uA, then you should take a look at the HW.

    You can post your own HW design here, so we can have our HW expert taking a look at it too.
  • Hi Zhang -

    Another theory for why you measure too high standby current on the CC2640 -- could it be that you have something connected on the I/O pins of the CC2640?

    You say that you don't have much connected on the same board, but you mention it is connected to a mobile phone. Maybe you need to (re-)configure any of the I/O pins of the CC2640 before you enter standby, in order to minimize the current consumption?

  • Thanks a lot. I did as you said and found the root cause. Actually my HW is always attached to a XDS110 debugger, so the debugger consumes some current. Actually I my step is as follows: 1. flash the Simple BLE Peripheral program into cc2640. 2. Press the start debugging button in CCS to start running, and my device is advertising, functional. 3. Unplug USB cable attached to XDS110, to get a precise measurement on current. Current is 3mA and the bluetooth connectivity is still good. 4. Reset the power supply and current drops to 200uA, but the bluetooth connectivity can not be set up, device is not functional.

    My power supply is 2 batteries, 1.5V each.

    I think 200uA is good, but it is no longer functional. Do you know why? Is it not in the free run mode? Thanks.
  • Thank you for your proposition. Although I have some leds connected on I/O pins, I have always set all GPIO outputs to low, they should not consume power. Yes my board is connected to a phone's app through BLE. Actually my HW is always attached to a XDS110 debugger, so the debugger consumes some current. I fail to let my board run freely, it can not run in release mode. My step is as follows: 1. flash the Simple BLE Peripheral program into cc2640. 2. Press the start debugging button in CCS to start running, and my device is advertising, functional. 3. Unplug USB cable attached to XDS110, to get a precise measurement on current. Current is 3mA and the bluetooth connectivity is still good. 4. Reset the power supply and current drops to 200uA, but the bluetooth connectivity can not be set up, device is not functional.

    My power supply is 2 batteries, 1.5V each.

    I think 200uA is good, but it is no longer functional. Do you know how to make it run in release mode? So that if I unplug debugger, it will still run each time I reset power. Now if I reset its power, it does not function. Thanks.
  • The current consumption does not sound right when you detached the USB while in connection. Do you have scope picture of your current measurement? when you reset the power, can you measure the VDDS for the chip when it's powered from battery? You can connect to the device when running in debug mode? or you can only see advertisement in debug mode?
  • Hi Zhang,


    I've been in similar situation and learned that the XDS110 has to be completely disconnected from any JTag pin. JTag-TDI and TDO must not be connected otherwise the XDS110 seem not to allow sleep for the CC2640.


    I use the RF06 board for that reason (XDS100 v3)

    May be that helps you too. There is no other thing to do for, what you call, the 'release mode'.

    Good luck

    Ralph

  • Thank you Lee, you really are an expert. I found the cause, my debugger draws most of current, that is why it was 3mA, without debugger, my board consumes only 10uA. For your question 1, I do not understand "scope picture". 2. VDDS is 3V, it is normal. 3. Yes, I can connect to the device when running in debug mode. 4. It is fully functional in debug mode, so I can of course see advertisement in debug mode. 

    But I do not know how to put my device in release mode(i.e. without debugger, I want it to auto run each time I reset power. But now, in release mode, it can only advertise to my phone, but my phone cannot connect to it.

  • When I said scope picture, I meant the plot as in the following document figure 24.
    www.ti.com/.../swra478

    How do you measure the current? do you have the same tool as listed in the application note? If yes, can you provide plot when you don't have debugger on and just power up the chip?
  • Hi,

    Can you tell me how can I work with SimpleBLEPeripheral example and connect some Bluetooth gateway to my Sensortag cc2650stk and send data from cc2650stk to that gateway ?
  • I see your question has been answered here : e2e.ti.com/.../526984