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: basic_ble_oad_onchip multirole consumes more current in SHUTDOWN mode

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

  Currently I am working on basic_ble_oad_onchip multirole profile project and basic_ble central profile project.

1. In basic_ble central profile project implemented an shutdown mode and able to achieve an 120 to 150 nA.

2. But in basic_ble_oad_onchip multirole profile project we implemented same shutdown mode same as basic_ble central profile project and we are getting only above 100 uA.

[Note: Peripheral role advertisement will start upon an user request via unique button, till than device will act in central role]

Here I have attached an implementation to enter shutdown mode

.

void Low_Power()
{
    /************************Disable Peripherals*********************************************************************/
	GPIO_disableInt(LED);
    GPIO_clearInt(BUTTON1);
    GPIO_clearInt(BUTTON2);
    GPIO_clearInt(BUTTON3);
	
    /**********************************************GPIO PIN Enable interrupts *******************************************************/
     GPIO_setConfig(BUTTON1, GPIO_CFG_IN_NOPULL | GPIO_CFG_SHUTDOWN_WAKE_LOW);
     GPIO_setConfig(BUTTON2, GPIO_CFG_IN_NOPULL | GPIO_CFG_SHUTDOWN_WAKE_LOW);
     GPIO_setConfig(BUTTON3, GPIO_CFG_IN_NOPULL | GPIO_CFG_SHUTDOWN_WAKE_LOW);

   int_fast16_t  Status = PowerCC23X0_notify(PowerLPF3_ENTERING_SHUTDOWN);

   if(Status == Power_SOK)
   {
       UART2_close(uart) ;
       Power_shutdown(0,0);
   }
   else
   {
       UART2_write(uart,"\nFAIL",5, 0);
	   }
}

SDK Version : simplelink_lowpower_f3_sdk_8_10_01_02

CCS version: CCS 12.7.1

May I know why this much current consumes in OAD profile and how we can optimize to achieve  120 to 150 nA.

Thanks,

Vignesh.

  • Hi,

         gentle reminder.

  • Hello Vignesh,

    Apologies for the late reply. I was out of office.

    Are you using basic_ble_oad_onchip out of the box example and then modifying the application layer to support multirole? Could you please share with me how you do this from a high level perspective? This Low_Power() code you have shared is also implemented in basic_ble on the same way? When you measure the power consumption, are you also flashing the mcuboot and the persistent app?

    BR,

    David.

  • Hi David,

    Are you using basic_ble_oad_onchip out of the box example and then modifying the application layer to support multirole?

    Yes, I am using basic_ble_oad_onchip and modifying the application layer to support multirole.

    This Low_Power() code you have shared is also implemented in basic_ble on the same way?

     Yes, I have implemented same Low_Power() function in basic_ble on the same way.

    When you measure the power consumption, are you also flashing the mcuboot and the persistent app?

    Yes,I have flashed mcuboot and the persistent app and application code when measuring the power consumption.

    Thanks,

    Vignesh.

  • Hello Vignesh,

    Thanks for the information.

    Could you please confirm the status return for PowerCC23X0_notify() to be what you expect (Power_SOK) as well as for Power_shutdown()? In addition, are you using any other peripheral (other than UART)?

    BR,

    David.

  • Hi David,

      Return status for PowerCC23X0_notify() is Power_SOK   (0)  /*!< OK, operation succeeded */ . Apart from UART we are not using any other peripherals.

    Thanks,

    Vignesh. 

  • Hello Vignesh,

    Interesting. I would expect it to go to shutdown as well if the operation succeeded. Could we try to narrow down the problem? I would suggest starting by just running the same command on a multi-role example (similar to the one you have) and see if you get the expected current consumption. What are you using to measure the current draw?

    In addition, are you calling the Low_Power() function from the same place in both projects?

    BR,

    David.

  • Hi David,

    1. In basic_ble central profile project implemented an shutdown mode and able to achieve an 120 to 150 nA.

    2. But in basic_ble_oad_onchip multirole profile project we implemented same shutdown mode same as basic_ble central profile project and we are getting only above 100 uA.

    [Note: Peripheral role advertisement will start upon an user request via unique button, till than device will act in central role]

    We are tried power shutdown in Non OAD implemented blasic_BLE project. In that we have achieved the lowest current(120 to 150 nA) but after implementing OAD in the same project  we are not able to achieve the same current as non OAD. Instead of that we are getting more than 100uA.

    In addition, are you calling the Low_Power() function from the same place in both projects?

    Yes, We are calling Low_Power() function from the same place in both projects.

    Thanks,

    Vignesh.

  • Hello Vignesh,

    Alright. I will test this on my own end. It could definitively be that the Low_Power() function is working but something else in the system is avoiding the device to go to shutdown entirely. What happens after this function is called? Do you still see the device advertising? If you scan with your phone (using Simple Link connect app for instance) do you see the device still adv? It would be helpful if you can run a EnergyTrace test and share a screen capture of the trace. This to see what the device might be doing based on the current draw profile.

    BR,

    David.

  • Hi David,

        After  Low_Power() function is called the device will enter into shutdown mode. Upon button interrupt device will wake up and will start scanning. When device is woke up state we have to issue an custom user command via UART to enable peripheral role after device restart.

    Still that  device will be in central role only.

    if(startCentralOADmode == 1 )
    {
            #if defined( HOST_CONFIG ) && ( HOST_CONFIG & ( PERIPHERAL_CFG | CENTRAL_CFG ) )
                status = DevInfo_start();
                if(status != SUCCESS)
                {
                    // TODO: Call Error Handler
                }
                status = SimpleGatt_start();
                if(status != SUCCESS)
                {
                    // TODO: Call Error Handler
                }
            #endif
    
            #if defined( HOST_CONFIG ) && ( HOST_CONFIG & ( PERIPHERAL_CFG ) )
                // Any device that accepts the establishment of a link using
                // any of the connection establishment procedures referred to
                // as being in the Peripheral role.
                // A device operating in the Peripheral role will be in the
                // Peripheral role in the Link Layer Connection state.
                status = Peripheral_start();
                if(status != SUCCESS)
                {
                    // TODO: Call Error Handler
                }
            #endif
    }

    Thanks,

    Vignesh.

  • Hello Vignesh,

    I am testing this with oad onchip example, please allow me until Monday to get back to you with an answer. To replicate it, when/where in the code do you call the Low_Power() function?

    BR,

    David.

  • Hi David,

    Sorry, My mistake I have marked as an "This resolved my issue".

    Please update  any observations regarding power consumption.

    To replicate it, when/where in the code do you call the Low_Power() function?

    Upon device bootup after 10 sec calling an  Low_Power() function.

    Thanks,

    Vignesh.

  • Hello Vignesh,

    I have tried to reproduce on my side using the basic_ble_oad, persistent_app and mcuboot_oad_onchip as you can see below:

    I am calling the function Low_power() after the application (app_connection.c) receives a disconnection event (BLEAPPUTIL_LINK_TERMINATED_EVENT) from the stack inside Connection_ConnEventHandler() cb function.

    void Low_Power()
    {
       int_fast16_t  Status = PowerCC23X0_notify(PowerLPF3_ENTERING_SHUTDOWN);
       if(Status == Power_SOK)
       {
           Power_shutdown(0,0);
       }
    }

    Please see the results:

    I think the extra power consumption you are experiencing could be due to the Button interrupts. Please let me know if up to this point (with the modified Low_power() function) you can get the expected results.

    BR,

    David.

  • Hi David,

    Thanks for your effort.

    Please let me know if up to this point (with the modified Low_power() function) you can get the expected results.

    I have tested by calling the function Low_power() after the application (app_connection.c) receives a disconnection event without configuring any GPIO interrupts in basic_ble_oad and we are getting an expected results.

    But with  Low_power() function implementation with GPIO Button interrupts in Non OAD code we can achieve an expected results. But why we are not able to achieve in OAD code.

    Could you please test with 3 button interrupts.

    Upon device bootup after 10 sec calling an  Low_Power() function and with an button interrupt device has to wake up from shutdown.

    Thanks,

    Vignesh.

      

  • Hello Vignesh,

    I am testing with the two buttons from the board, how do you have them configured in SysConfig?

    BR,

    David.

  • Hi David,

    Here I have attached the image of GPIO configured in SysConfig.

    Above configuration is same for 3 GPIO's except GPIO pin.

    In above image GPIO's has configured by default. 

    Thanks,

    Vignesh.

  • Hello Vignesh,

    Thanks for the extra info. I have tested with 2 GPIOs (button - left and right from the TI Launchpad) and I cannot reproduce the extra current consumption you are experiencing. I suspect you may have some leakage on those pins, however it wouldn't explain why it works well with the other application (basic_ble).

    Here is my GPIO setting

    void Low_Power()
    {
        /************************Disable Peripherals*********************************************************************/
        GPIO_clearInt(CONFIG_GPIO_BUTTON_0_INPUT);
        GPIO_clearInt(CONFIG_GPIO_BUTTON_1_INPUT);
    
        /**********************************************GPIO PIN Enable interrupts *******************************************************/
         GPIO_setConfig(CONFIG_GPIO_BUTTON_0_INPUT, GPIO_CFG_IN_NOPULL | GPIO_CFG_SHUTDOWN_WAKE_LOW);
         GPIO_setConfig(CONFIG_GPIO_BUTTON_1_INPUT, GPIO_CFG_IN_NOPULL | GPIO_CFG_SHUTDOWN_WAKE_LOW);
    
       int_fast16_t  Status = PowerCC23X0_notify(PowerLPF3_ENTERING_SHUTDOWN);
    
       if(Status == Power_SOK)
       {
           //UART2_close(uart);
           //GPIO_write(CONFIG_GPIO_LED_GREEN,1);
           Power_shutdown(0,0);
       }
       else
       {
           //UART2_write(uart,"\nFAIL",5, 0);
           }
    }

    Here is the process while profiling the current draw.

    BR,

    David.