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.

CC1352P: Load module not reporting correct value

Part Number: CC1352P
Other Parts Discussed in Thread: SYSBIOS

Hello,

I am trying to implement the Load module so that we can monitor total time spent in/out of Idle.  I added the following code to the relevant release.cfg file:

/* ================ Load configuration ================ */
var Load = xdc.useModule('ti.sysbios.utils.Load');
Load.taskEnabled = true;
Load.updateInIdle = true;
Load.windowInMs = 500;
 
Load.common$ = undefined;
Load.enableCPULoadCalc = true;
Load.minIdle = 0;

I have a Task that then calls Load_getCPULoad() periodically and uses this percentage to update a counter which is supposed to show total time spent outside of the Idle loop.

Unfortunately Load_getCPULoad() always reports 100% CPU usage, which is baffling given that the execution graph shows we are in Idle ~99% of the time.  I would expect Load_getCPULoad() to return something more like 1 or 0.



I have tried other configurations as well, including setting Load.updateInIdle to false and manually calling Load_update() from the aforementioned Task.  The result is the same.

Any advice is appreciated.

Thanks,

Scott

  • Hi Scott,

    I'm not sure whether we can support your request. I will check internally. 

    In the mean while, can you specify:

    1. Which version of the SDK are you using? 

    2. Does your device ever go to standby (sleep)?

    Cheers,

    Marie H

  • Hi Marie,

    Thanks for the reply.  We are using SDK 4.30.0.54.  Regarding standby/sleep, I believe it does.  We are using the Power module's idle function (we have Idle.addFunc('&Power_idleFunc') for the Idle configuration in release.cfg).  This is the power config we have in ti_drivers_config.c:

    /*
     *  =============================== Power ===============================
     */
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26X2.h>
    #include "ti_drivers_config.h"
    
    extern void PowerCC26XX_standbyPolicy(void);
    extern bool PowerCC26XX_calibrate(unsigned int);
    
    const PowerCC26X2_Config PowerCC26X2_config = {
        .enablePolicy             = true,
        .policyInitFxn            = NULL,
        .policyFxn                = PowerCC26XX_standbyPolicy,
        .calibrateFxn             = PowerCC26XX_calibrate,
        .calibrateRCOSC_LF        = true,
        .calibrateRCOSC_HF        = true,
        .enableTCXOFxn            = NULL
    };

  • Hi Scott,

    Unfortunately we can't support your request. XDCTools and TI-RTOS6 is no longer under development. 

    I would recommend searching on the forum in case someone has had a similar issue.

    Regarding power modes, you can use Energy Trace on your LaunchPad to take a current measurement while the code is running. You can see from the current consumption whether the device is in standby, idle or active.

    https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/docs/ti154stack/html/energy-trace/energy-trace.html

    Cheers,

    Marie H