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.

TM4C129ENCPDT: Low Power Consumption in TM4C129ENCPDT controller by keeping TI-RTOS running

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: SYSBIOS, EK-TM4C1294XL

Tool/software: Code Composer Studio 6.0.1, TI-RTOS

Hello Everyone,
I am trying to implement Low power mode operation by putting controller in sleep mode in TM4C129ENCPDT (TI-RTOS) by referring example code
So I created interrupt vector table (tried with two different section) in application code.
While building project, I am facing below mentioned issue

CASE-01:
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
<-------- Start -------->


program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c , overlaps with ".intvecs", size 0x200 (page 0)
linker.cmd /CSL1601/Release/configPkg line 209 C/C++ Problem
<-------- End -------->

CASE-02:
#pragma DATA_SECTION(g_pfnVectors, ".vtable")
<-------- Start -------->
program will not fit into available memory. placement with alignment fails for section ".vtable" size 0x200 , overlaps with ".vecs", size 0x360 (page 0) EK_TM4C1294XL.cmd /CSL1601 line 39 C/C++ Problem
<-------- End -------->

############################################################

Below is the address mentioned in .cmd and .cfg file of TI-RTOS project,
<-------- Start .cmd-------->
#define APP_BASE 0x00008000
MEMORY
{
FLASH (RX) : origin = APP_BASE, length = 0x00100000
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}

SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH

.vtable : > 0x20000000
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
}

__STACK_TOP = __stack + 512;
<-------- End -------->

<-------- Start .cfg -------->

var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
m3Hwi.resetVectorAddress = 0x8000;
<-------- End -------->

Please do suggest, where and all I should do moification to resolve this issue

  • in sleep mode in TM4C129ENCPDT (TI-RTOS) by referring example code

    Which example code?

    CASE-01:
    #pragma DATA_SECTION(g_pfnVectors, ".intvecs")
    <-------- Start -------->


    program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c , overlaps with ".intvecs", size 0x200 (page 0)
    linker.cmd /CSL1601/Release/configPkg line 209 C/C++ Problem

    It seems like you are trying to set the Reset Vector Table address to 0x8000. Is that correct? The Reset Vector Table should be at 0x0. See below default. Why are you creating a new vector table? I also don't understand why sleep mode would require a new vector table and a new reset vector address. I strongly suggest you not change the vector table unless you really know what you want to accomplish would require doing do. You basically are taking away the default vector table the TI-RTOS is managing. 

  • Thanks for the response

    <-------- Bootloader .cmd file start -------->

    #define APP_BASE 0x00000000

    #define RAM_BASE 0x20000000

    MEMORY

    {

        FLASH (RX) : origin = APP_BASE, length = 0x00100000

        SRAM (RWX) : origin = 0x20000000, length = 0x00040000

    }

    SECTIONS

    {

        .intvecs:   > APP_BASE

        .text   :   > FLASH

        .const  :   > FLASH

        .cinit  :   > FLASH

        .pinit  :   > FLASH

        .init_array : > FLASH

     

        .vtable :   > RAM_BASE

        .data   :   > SRAM

        .bss    :   > SRAM

        .sysmem :   > SRAM

        .stack  :   > SRAM

    }

    __STACK_TOP = __stack + 1024;

    <-------- End -------->

    In my previous post, I have mentioned application code .cmd file where APP_BASE address starts from 0x00008000.

    As per your suggestion, I have removed .intvecs from application code .cmd file, now it’s error free but I amn’t able to achieve my ultimate goal i.e sleep mode

    I am trying to implement sleep mode in our micro-controller by referring example code sleep_modes, where sleep and deep_sleep are available, but I am trying only sleep mode.

    For the same, I have created a new task where based on button (Port P, pin 0) press (interrupt), system will switch from run to sleep mode and vice-versa, so here one interrupt is required

  • Your suggestion isn't to go for IVT, instead use gpio interrupt to achieve sleep mode. Then let me try the same

    Please correct me, if I have understood anything wrong

    .

    Only reason I tried with this because in example code it is implemented using IVT in single thread application

    Our objective is to achieve low power consumption, any suggestion if you have feel free to share

    Thanks

  • I am trying to implement sleep mode in our micro-controller by referring example code sleep_modes, where sleep and deep_sleep are available, but I am trying only sleep mode.

    There is no TI-RTOS sleep_modes example for TM4C129.  TI-RTOS does not have any built-in Power management support for Tiva devices as of now. You should be able to use driver lib functions in a TI-RTOS application to put the core to sleep. 

    Are you referring to the non-TI-RTOS example C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\sleep_modes?

    If you are trying to adapt the non-TI-RTOS sleep_modes example for TI-RTOS then I will suggest you first try the example as-is and get it to work first. 

    Your suggestion isn't to go for IVT, instead use gpio interrupt to achieve sleep mode.

    What is IVT? 

  • Interrupt Vector Table

  • Hello,

    All previous mentioned attempt(s) are to implement Low Power Consumption in TM4C129ENCPDT by keeping TI-RTOS running,

    -> 1st by referring example code of sleep mode (single thread application), but failed because of Interrupt vector table

    I wrote Hwi code to generate interrupt, it cause controller restart, may be because of some mismatch between gpio interrupt and ROM API(s) of example code

    -> 2nd by making enable, disable and priority reduction to -1 of Task(s), but unfortunately I didn't observe any power consumption difference

    ###############################################################

    My ultimate purpose is, Power consumption of controller in

    -> sleep mode should be less than 5mA

    -> run mode based on the connected peripheral devices

    Sleep Mode

    In every periodic interval and based on condition as well, controller has to go for sleep mode

    During sleep mode, few peripherals will be in active condition while most of peripheral will be disconnected

    Controller wakeup will take place, only in case of external interrupt

    External interrupt (Hwi) can occur in two conditions,

    -> normal case, as per our process requirement which will be periodic

    -> exceptional case, it isn't regular but controller should wakeup to attend interrupt then come back to sleep mode again

    Any suggestion w.r.t hardware design or software modification are acceptable considering TM4C129ENCPDT micro-controller and TI-RTOS

    I request all community members, voluntarily please help to achieve Low Power Consumption in TI-RTOS

    Thanks

  • I wrote Hwi code to generate interrupt, it cause controller restart, may be because of some mismatch between gpio interrupt and ROM API(s) of example code

    I suspect that the device is awaken due to the timer. As you may have already known, the TI-RTOS or any RTOS relies on a periodic ticks for scheduling. By default the ticks are generated at 1ms period. I tend to think that after you entered sleep mode the timer woke up the processor by generating an interrupt. 

  • Thanks for your response @Charles

    In case program is trying to get into sleep mode, controller is restarting

    I don't have any clue how to move ahead

    So can you please help how to achieve Low Power Consumption in TM4C129ENCPDT by keeping TI-RTOS running

    At least I would like to know whether it is possible or not to achieve the same

    Awaiting for your response

  • Hi,

     As I mentioned before, TI-RTOS does not have any built-in Power management (e.g. TI-RTOS drivers) support for Tiva devices.  You might want to try disabling all interrupts except the GPIO port that you plan to use for wakeup before you enter sleep mode.  First see if that will prevent the processor from waking up. Once the GPIO has woken up the device, you can reenable the rest of interrupts (e.g. timer interrupts for BIOS). 

  • Hi,

    Low power mode is working in TI-RTOS

    Before entering to sleep/deep-sleep mode, I am setting task priority to -1 and reducing the operating frequency to 16MHz

    Once it is coming out from sleep mode, I am changing priority to its original value and operating frequency to 120MHz

  • Hi,

      Thanks for the tips. I'm sure it will benefit the community who is looking for the same solution.