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.

CC1310: I have problems with the execution of functions inside a task, it could be related to the stack size?

Part Number: CC1310


Tool/software:

I have problems with the execution of functions inside a task, it could be related to the stack size.

In my application I have declared a task (Task_RF) that is in charge of executing most of the processes, one of them is calling functions to do some base64 encodings.
When I declare these functions in a section of the task code my application pauses at some point, but when I comment out the lines of these functions the program runs correctly.

I have had a look at the stack usage section in CCS IDE and got the following information.
Could you help me to interpret what I am seeing.

Thanks in advance.

  • I am afraid I cannot give you much help just from the info I have received from you.

    If you suspect that your problem is related to the stack size, you should simply try to increase it to see if the problem goes away.

    I do not know what example you use as a starting point or what you are doing in your Task_RF, but if you suspect that your problems are related to some specific function, please try implement those function in the empty example from the SDK, and see if you can re-create the problems.

    If you can, you can share your modified empty.c file, and we can try to recreate the problems here.

    I also recommend you to take a look at this:

    Runtime Object View (ROV)

    Siri

  • Hi Siri.
    My project is based on a legacy template made by another engineer.
    One thing I noticed when I started interpreting the code and comparing it to the Easylink examples is that my legacy project does not include the ‘main_tirtos.c’ file which I notice creates and allocates the stack size of each thread. Is it necessary to attach the configuration of the ‘main_tirtos.c’ file? The stack size in my project is allocated as follows in the main function when creating tasks.

    Note: I'm reviewing the information provided about Runtime Object View (ROV)

    //Construct Task_RF
    Task_Params_init(&RFTaskParams);
    RFTaskParams.stackSize = 1024;
    RFTaskParams.stack = &RFTaskStack;
    RFTaskParams.priority = 2 ;

    //Construct Task UART thread
    Task_Params_init(&uarTaskParams);
    uarTaskParams.stackSize = 1024;
    uarTaskParams.stack = &uarTaskStack;
    uarTaskParams.priority = 1 ;


    Task_construct(&RFTask, Task_RF, &RFTaskParams, NULL);
    Task_construct(&uarTask, Task_Uart_RF_Serial, &uarTaskParams, NULL);// 

  • No, you do not have to include that file.

    In for example the rfEasyLinkTx example, this file is not included, and the stack size is defined in the rfEasyLinkTx,c file.

    It can be a good exercise to go through the following SLAs:

    Real-Time OS

    BR

    Siri