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: Current of sample code "empty.c".

Part Number: CC2340R5
Other Parts Discussed in Thread: , ENERGYTRACE

Hi.

The sample code "empty.c" was written to LP-EM-CC2340R5 to check the current.

It can be seen that the current periodically rises by about 8µA.

Why does the current rise?

Also, the current needs to be reduced in the product I am developing. Is there any method to reduce this periodic rise in current?

A graph of the currents obtained is shown below.

To check the current consumption, I changed the mainThread in empty.c as follows.

simplelink_lowpower_f3_sdk_7_40_00_64\examples\rtos\LP_EM_CC2340R5\drivers\empty

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

    /* Call driver init functions */
    GPIO_init();
    // I2C_init();
    // SPI_init();
    // Watchdog_init();

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

The current values were measured with the following circuit.

  • Hello Tsuchiya,

    Thanks for reaching out.

    Please help me with the following questions to understand better the case:

    1. What GPIOs have you configured?
    2. Is there any other modification you have done to the empty project other than what you have mentioned?

    What I would assume is happening here based on what you have shared is that the MCU is waking up for a very short period of time and then back to sleep mode for 1 sec.

    BR,

    David.

  • Hello David.

    I will answer your questions.

    1.GPIO settings are pasted below.

    /*
     *  ======== gpioPinConfigs ========
     *  Array of Pin configurations
     */
    GPIO_PinConfig gpioPinConfigs[26] = {
        GPIO_CFG_NO_DIR, /* DIO_0 */
        GPIO_CFG_NO_DIR, /* DIO_1 */
        GPIO_CFG_NO_DIR, /* DIO_2 */
        GPIO_CFG_NO_DIR, /* DIO_3 */
        GPIO_CFG_NO_DIR, /* DIO_4 */
        GPIO_CFG_NO_DIR, /* DIO_5 */
        GPIO_CFG_NO_DIR, /* DIO_6 */
        GPIO_CFG_NO_DIR, /* DIO_7 */
        GPIO_CFG_NO_DIR, /* DIO_8 */
        GPIO_CFG_NO_DIR, /* DIO_9 */
        GPIO_CFG_NO_DIR, /* DIO_10 */
        GPIO_CFG_NO_DIR, /* DIO_11 */
        GPIO_CFG_NO_DIR, /* DIO_12 */
        GPIO_CFG_NO_DIR, /* DIO_13 */
        GPIO_CFG_OUTPUT_INTERNAL | GPIO_CFG_OUT_STR_MED | GPIO_CFG_OUT_LOW, /* CONFIG_GPIO_LED_0 */
        GPIO_CFG_NO_DIR, /* DIO_15 */
        GPIO_CFG_NO_DIR, /* DIO_16 */
        GPIO_CFG_NO_DIR, /* DIO_17 */
        GPIO_CFG_NO_DIR, /* DIO_18 */
        GPIO_CFG_NO_DIR, /* DIO_19 */
        GPIO_CFG_NO_DIR, /* DIO_20 */
        GPIO_CFG_NO_DIR, /* DIO_21 */
        GPIO_CFG_NO_DIR, /* DIO_22 */
        GPIO_CFG_NO_DIR, /* DIO_23 */
        GPIO_CFG_NO_DIR, /* DIO_24 */
        GPIO_CFG_NO_DIR, /* DIO_25 */
    };
    
    /*
     *  ======== gpioCallbackFunctions ========
     *  Array of callback function pointers
     *  Change at runtime with GPIO_setCallback()
     */
    GPIO_CallbackFxn gpioCallbackFunctions[26];
    
    /*
     *  ======== gpioUserArgs ========
     *  Array of user argument pointers
     *  Change at runtime with GPIO_setUserArg()
     *  Get values with GPIO_getUserArg()
     */
    void* gpioUserArgs[26];
    
    const uint_least8_t CONFIG_GPIO_LED_0_CONST = CONFIG_GPIO_LED_0;
    
    /*
     *  ======== GPIO_config ========
     */
    const GPIO_Config GPIO_config = {
        .configs = (GPIO_PinConfig *)gpioPinConfigs,
        .callbacks = (GPIO_CallbackFxn *)gpioCallbackFunctions,
        .userArgs = gpioUserArgs,
        .intPriority = (~0)
    };

    2.No, I did not. No changes were made.

  • I changed Sleep time to 10 seconds and recorded the waveform.

    No changes except for sleeping time.

    It can be confirmed that the MCU wakes up every 10 seconds and the current rises.

    However, it can be seen that the current rises by about 10 µA even during sleep.

    I want to improve this small current rise.

    Thank you in advance for your cooperation.

  • Hi,

    If I may, the spikes in the current consumption make me think about recharge pulses. The same is described for the CC26xx devices in §2 of https://www.ti.com/lit/swra478

    Best regards,

  • Thanks Clément.

    I have a question about the recharge pulse.

    1. How is the magnitude of the recharge pulse determined?
    2. Also, Is it possible for the recharge pulse to be around 10µA?

    Thanks in advance.

  • Hi,

    The magnitude of the recharge pulses is determined by the hardware design. The larger the capacitors used, the more energy stored, the higher the recharge pulses are.

    10 uA recharge pulses sounds quite low.

    Regards,

  • Hi.

    I need to find out if this spike is a recharge pulse.

    Is there any way to calculate the magnitude of the recharge pulse value and its frequency?

    The device I am measuring is LP-EM-CC2340R5, nothing is connected to LP-EM-CC2340R5.

    Thanks in advance.

  • Hello Tsuchiya,

    I have run a quick test on my end with the same project and code modifications. I used EnergyTrace for it. This are my results.

    Wakeup every 1 sec as defined (red squares). The rest of the events are "recharge pulses". You can see they can go higher than 5 mA for a very short of period. FYI, this current consumption is also accounted for as part of the standby current (on average <700 nA).

    I am not sure if your measurement setup could have something to do here. Could you use Energy Trace and report your findings?

    BR,

    David.

  • Hello David.

    Thank you for your cooperation.

    Getting waveforms with Energy Trace.

    I am developing the product on a board that I created in-house.

    I have observed a spike similar to the above on this board and need to determine if this spike is due to the recharge pulse.

    So, I think that if I can calculate the magnitude and period of the recharge pulses, I can identify them.

    Therefore, I would like to know how to calculate the magnitude and period of the recharge pulse when using LP-EM-CC2340R5 as an example.

    Thanks in advance.

  • Hello Tsuchiya,

    Understood. As per my understanding, there is no fix answer regarding this question. The device will recharge when it's needed. For example if the device has more leakage current during standby (leakage from IO configuration...etc), then it will recharge more often. You can see the answer to this question here.

    Could you please share a bit more about why you need to identify the recharge pulses? The pulses you see (less than 10 uA) do not seem to be recharge pulses. Have you been able to look into EnergyTrace?

    BR,

    David.