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.

TM4C1294 with TI-RTOS: How to make the chip sleep in idle task

I wonder how to config the chip into sleep mode to save power consumption. While the chip is running at 120M, it consumes about 100mA.

In the .cfg file, there is configuration for idle. Shall I add a function to enter sleep mode here? Note, I have enabled the LoggerIdle, and I don't know if they will conflict.

Is there any example about this?

Thanks

  • Hi Jianyi,

    You can add functions to your Idle loop by simply adding the following to your .cfg file:

    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    Idle.addFunc("functionName");

    Functions in the Idle.idleFxns array will be called in sequential order (from first added to last).  Thus you can define a function to manage the chips power consumption and add have it run while Idle.

    As for logging, it is not recommended to use LoggerIdle for an application which will put the processor in a sleep/halted state.  There are two problems with using LoggerIdle:

        1. The LoggerIdle transfer function is the last function to be called in the Idle loop (it should be considered the lowest priority).  This means that if your power management function puts the processor to sleep, it will wake (interrupt or from another wake source) and return to executing Tasks, not the Idle loop.

        2.  LoggerIdle only sends out 1 record per each Idle loop iteration, so to get all records out will take several Idle iterations affecting thus, reducing sleep time.  

    I think LoggerStopMode is a better alternative.  You will need to halt your processor to extract logs, but you wont have the aforementioned limitations.

    As for power, unfortunately TI-RTOS does not have power management support for TM4C devices.  I would recommend you post a power question to the TM4C ARM forum (link).

    Hope this helps,

    -- Emmanuel