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: Idle current problem

Part Number: CC2340R5
Other Parts Discussed in Thread: ENERGYTRACE

Tool/software:

Hi,

At first, my toolchain are following.

- SDK: SIMPLELINK-LOWPOWER-F3-SDK (version. 8.10.01.02)

- Examples: examples\rtos\LP_EM_CC2340R5\prop_rf\rfPacketTx

- Compilar: ARM CGT CLANG 4.0.0

- IDE: CCS 12.8

I want to measure the idle current to check whether it is same as the data sheet.

So I added LGPT function to empty.c in SDK examples.

void *mainThread(void *arg0)
{
    /* 1 second delay */
    uint32_t time = 1;

    /* Call driver init functions */
    GPIO_init();

    /* Configure the LED pin */
    GPIO_setConfig(CONFIG_GPIO_LED_0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);

    /* LGPT setting&start for idle current measurement */
    uint32_t counterTarget;
    LGPTimerLPF3_Handle hTimer;
    hTimer = NULL;
    LGPTimerLPF3_Params params;
    LGPTimerLPF3_Params_init(&params);
    params.hwiCallbackFxn = timerCallback;
    params.prescalerDiv = 10;
    hTimer = LGPTimerLPF3_open(CONFIG_LGPTIMER_0, &params);
    if(hTimer == NULL) {
      //Log_error0("Failed to open LGPTimer");
      //Task_exit();
    }
    counterTarget = 48000;  //1ms with a system clock of 48 MHz
    LGPTimerLPF3_setInitialCounterTarget(hTimer, counterTarget, true);
    LGPTimerLPF3_enableInterrupt(hTimer, LGPTimerLPF3_INT_TGT);
    LGPTimerLPF3_start(hTimer, LGPTimerLPF3_CTL_MODE_UP_PER);

    /* Turn on user LED */
    GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_ON);

    while (1)
    {
        sleep(time);
        GPIO_toggle(CONFIG_GPIO_LED_0);
    }
}

The settings for Power Policy, DCDC and LF clock are as follows.

The LP_EM_CC2340R5 is supplied with a power supply voltage of 1.8V.

A snapshot of waveform that I measured power supply current is following.

I set the timer cycle of the LGPT to 11msec, so I expected to measure an idle current of 1.5mA except when the LGPT was triggered, but that was not the case.

I would like to know the cause of this.  This is 1st Problem.

In addition, a pulse waveform was measured at a cycle of 1ms.

I would also like to know the cause of this. This is 2nd Problem.

Best regards,

  • Hello Yoshi,

    From our TRM: "Alternatively, the internal Global LDO (GLDO) can be used instead of the DC/DC regulator, but this increases the current consumption of the device. In this mode, disconnect the DCDC pin and remove the DC/DC regulator inductor. The GLDO is connected internally to VDDR. See the device-specific data sheet for the GLDO decoupling capacitor requirements. More information on the DC/DC capability can be found in Chapter 14." 

    -Using GLDO a higher current is expected, although due to a lower input voltage the power should be similar when compared to the DC/DC mode; did you already disconnect the DCDC pin and remove the DC/DC regulator as described in section 6.3.1? 

    From what I can possibly tell the timer is still going off every 1 ms but the timerCallback is going off every 11 ms, this could explain the many 1ms spaced peaks we see in the graph. 

    I added a GPIO toggle in the timerCallback and this is the EnergyTrace output I can see:

      

    (note that we can see the 11 1 ms periods here) 

    Thanks,
    Alex F

  • Hi Alex,

      >  did you already disconnect the DCDC pin and remove the DC/DC regulator as described in section 6.3.1? 

    Yes.

    I removed the inductor L1 in my Launch Pad.

    However, the power supply current is still high same as my snapshot. It's 2.7mA.

    If the DMA disabled, I think the power supply current should be 1.5mA as following description of datasheet.

    But why is that not the case?

      >  From what I can possibly tell the timer is still going off every 1 ms but the timerCallback is going off every 11 ms, this could explain the many 1ms spaced peaks we see in the graph. 

    Is it not possible to stop the 1ms timer?

    I did not start the 1ms timer deliberately.

    Best regards,

  • Hello Yoshi,

    For the 1 ms timer I think that the 1ms period we see is from "counterTarget = 48000;  //1ms with a system clock of 48 MHz" then the prescaler controls the callback "prescalerDiv = 10;"; meaning we are still generating a 1ms timer period, but the callback is configured to only go off after 11 ms. 

    I will try to get the GLDO version of the test early next week, but below is the DCDC version of my test. 

    empty_LP_EM_CC2340R5_freertos_ticlang.zip

    Thanks,
    Alex F

  • Hi Alex,

      >  For the 1 ms timer I think that the 1ms period we see is from "counterTarget = 48000;  //1ms with a system clock of 48 MHz" 

    I set the counterTarget to 12000 and checked the waveform. 

    As a result, the 1ms cycle peak did not change and still existed.

    (The 11ms interval changed to 2.75ms as calculated.)

    The following are screenshots.

    What is the cause? And is it possible to improve it?

    My objective is to measure ture idle current, but I think that the waveform above cannot be called idle current.

    (As the data sheet, the idle current is 1.5mA.)

    If possible, could you provide an example where idle current can be measured?

    Best regards,

  • Hello Yoshi,

    I will look further into my example to see what the timer is doing, and provide the code as the next step! 

    Thanks,
    Alex F

  • Hi Alex, 

    Thank you for your cooperation.

    We look forward to your code for idle current measurement.

    Best regards,

  • Hello Yoshi,

    We look forward to your code

    -Here is the code, still tuning a bit, stay tuned for the idle measurement. 

    8883.empty_LP_EM_CC2340R5_freertos_ticlang.zip

    Thanks,
    Alex F

  • Hi Alex,

    Thank you for your information.
    I'll wait until the tuning is finished.

  • Hello Yoshi,

    I am back from holidays, I apologize for any inconvenience here. 

    I downloaded the newly released 8.40 F3 SDK to do testing on, enabled LGPTimer (at 1 ms) and added a while + sleep loop (but still have the timer callback) and the average current is around 1.7 mA (close to the datasheet):

    (*this is with Energy Trace so the device was powered with 3.3 V not 1.8 V)

    5165.empty_LP_EM_CC2340R5_freertos_ticlang.zip

    (*note that I am using the Red LED to measure the LGPTimer) 

    Thanks,
    Alex F

  • Hello Alex,

    I'm glad you're back.

    I tried your new project.

    First, I measured the power supply current value with following settings.

    *3.3V power supply

    *DCDC config

    *LED was not used

    The result was same as your one. The current was about 1.7mA.

    Here is snapshot.

    Next, I did with following settings.

    *1.8V power supply

    *GLDO config

    *LED was not used

    In this condition, the current was about 2.8mA.

    Here is snapshot.

    I think this is not close to datasheet.

    I would like you to measure and confirm the current with 1.8V and GLDO setting.

    After that, please tell me how to get the close value as datasheet.



    Best regards,

  • Hello Yoshi,

    Sorry for the delay, I have looped in our HW engineer to help get this issue resolved. 

    Thanks,
    Alex F

  • Hello Yoshi,

    Me and the HW engineer got into the lab and grabbed the following in GLDO mode:

    -We are reading the expected datasheet power from this measurement. 

    On the previous question about the continuous 1ms peaks when LGPTimer is active, this is currently caused by FreeRTOS tickrate (to trigger ISR to keep os running), and by tuning this value we could increase or decrease the period of which the events occur. 

    RnD's recommendation:

    In order to perform power-measurements you can either set the longest possible tick-rate in FreeRTOS and measure the LGPT between two ticks, or if you’re not constrained to FreeRTOS and this is purely to perform measurements I would suggest moving to a nortos example.

    Thanks,
    Alex F

  • Hello Alex,

    Thank you for your measurement.

    I read your comment.

    From my understanding, the followings what you say.

    Are they correct?

    The idle current I measured before was 2.8mA, but that was due to ticks. If there were no ticks, the idle current would be even smaller.

    * The average current during the idle period depends on the tickrate.

    * When using FreeRTOS, the idle current values listed in the data sheet can be achieved momentarily. However, when considering long period (e.g. 1sec), they cannot be achieved. Because periodic tick interrupts occur.

    Best regards,

  • Hello Yoshi,

    The idle current I measured before was 2.8mA, but that was due to ticks. If there were no ticks, the idle current would be even smaller.

    -Yes, if we change the tickrate to lets say 1000 this should reduce the current:

    * The average current during the idle period depends on the tickrate.

    -Yes, as well as how we are measuring the current (manually calculating the time average gives a better result) 

    * When using FreeRTOS, the idle current values listed in the data sheet can be achieved momentarily. However, when considering long period (e.g. 1sec), they cannot be achieved. Because periodic tick interrupts occur.

    -Possibly, in this case I would say yes. There is always a bit of variation on this depending on how you measure like what I mentioned above; as well as peripheral setup. 

    Thanks,
    Alex F