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.

CCS/CC2640R2F: CC2640R2f power problem

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hello,

I use Sable-X-R2 (LAIRD model based on cc2640r2f).

I am using the simple periphjeral program,made UART program,advertise the data to the mobile.

It is customized board.

The data is advertised,but the current consumption is 3 mA.

So I use  Power_shutdown(Board_UART_RX,1000) in task function,in periodic part.

With this also I edit some part such as :

IN LOCAL VARIABLE   :

static PIN_Config SPPBLEAppPinTable1[] =
{

Board_UART_RX | PIN_GPIO_OUTPUT_DIS | PIN_INPUT_EN | PIN_PULLUP | PINCC26XX_WAKEUP_POSEDGE | PINCC26XX_WAKEUP_NEGEDGE, //wakeup or after shutdown periodic

PIN_TERMINATE
};

IN LOCAL FUNCTION BEFORE  SimpleBLEPeripheral_init()   function     =

void SPPBLEPeripheral_current1()                              ////after shutdown ,restart
{
hGpioPin1 = PIN_open(&pinGpioState1, BoardGpioInitTable);
PINCC26XX_setWakeup(SPPBLEAppPinTable1);
}


void SPPBLEPeripheral_deepsleep()
{
if(PIN_getInputValue(Board_UART_RX))
{
SDITask_createTask();
Task_sleep(5000);
}
}

And use it in SimpleBLEPeripheral_init()

static void SimpleBLEPeripheral_init(void)
{
// ******************************************************************
// N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
// ******************************************************************
// Register the current thread as an ICall dispatcher application
// so that the application can send and receive messages.
ICall_registerApp(&selfEntity, &syncEvent);

SPPBLEPeripheral_current();

SPPBLEPeripheral_deepsleep();

SPPBLEPeripheral_current1(); ..................................................

IN task functio I use   :

if (events & SBP_PERIODIC_EVT)
{

/* ONE TIME ADVERTISE & SLEEP MODE */

 
                               SDI_closeTask();                                                ////reset to 15 uA
// Util_stopClock(&periodicClock); ////reset to 15 uA
// Util_dequeueMsg(appMsgQueue); //// reset to 15 uA
                              Power_shutdown(Board_UART_RX,1000);          //// reset to 15 uA ,periodic is 1000
                             SPPBLEPeripheral_current1();                             ////after shut down,periodic

}

My problem in it is working,

I used the advertising period for 5000 msec,

Then it go for shut doen for some time (i think 10msec).

Again it restarts,like thge period works.

But I try to change the shutdown time   & it it not working ?

Can you please tell me ,how to change the shutdown time ?

what ever value I put in Power_shutdown() , the shutdown time is same.

It is not changing.

Pease help me.

#  I have also changed the following :

DEFAULT_DESIRED_MAX_CONN_INTERVAL     160  ,

DEFAULT_DESIRED_MIN_CONN_INTERVAL     80,

DEFAULT_DESIRED_CONN_TIMEOUT         1000,

DEFAULT_CONN_PAUSE_PERIPHERAL         6   .....

But there is no change.

PLEASE HELP ME..........................?

  • Hello Srijit,
    The shutdownTime parameter in Power_shutdown is not supported on CC2640R2F and any value specified for shutdownTime will be ignored. You need to wake up the device with the configured wakeup pin.
  • Hello Eirik,

    Thank you for the reply.
    But if I want to keep my board in sleep mode/shutdown mode (15uA) for sometime(say 5 minutes.)
    And then want to wake up(for periodic function).
    How can I do that?

    (# Please explain with steps,if any change needed in main.c------please tell me that also.)

    Regards,
    Srijit.
  • Then you need an external signal to wake the device up. It cannot wake it self up from shutdown. You can instead rely on standby which will be automatically entered if POWER_SAVING is defined in preprocessor options and no task is running. Then you can simply use clock timers to trigger periodic execution. AN example of this is used in simple_peripheral (see periodicClock in simple_peripheral.c)
  • Hello,
    I have already used the standby mode.
    But the current still remain 3.2mA.
    It is not entering in the uA range.
    I want the controller to run in uA value (no issue in periodic values).


    regards,
    Srijit.
  • Have you run the basic ti-rtos example (standby) and the basic simple_broadcaster to verify that your board does not leak current through any pins or that other peripherals on your board draw current?
  • Hello,
    I have tested other program.
    Now I use UART program in same module.
    Only difference is that,when I comment on SDATask_createTask(),I receive the proper power control.
    It shows the current of 15uA with advertise properly.
    But as soon as I use SDA,the current raises up to 3mA.
    So commenting the SDA is not the solution,I need to use the UART (and I am using two pins of UART,not MRDY and SRDY ).
    I have followed also the porting guide of Sable-x-R2.

    SDI_FLOW_CTRL=0.

    Regards,
    Srijit.
  • Then you must manually open/close the UART (or else the power driver will not put the device in standby) and implement some form of wakeup on the UART pins and then open/reconfigure the UART after wakeup.
  • Hello,

    Thank you very much.

    Srijit.