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.

AWR1642: Some questions about Task_create

Part Number: AWR1642
Other Parts Discussed in Thread: SYSBIOS

Hi,

I have a question.

If I call  Task_create like below

Task_Params_init(&taskParams);
taskParams.priority = 3;
Task_create(SRR_MSS_initBiosTimer, &taskParams, NULL);

Do I need to call  Task_delete() to delect it?

/* Create a MCU timer */
static void SRR_MSS_initBiosTimer (UArg arg0, UArg arg1)
{
Timer_Params timerParams;
Error_Block eb;
Error_init(&eb);
Timer_Params_init(&timerParams);
timerParams.period = (TM_ISR_10MS_CNT)*1000; //msec
timerParams.periodType = Timer_PeriodType_MICROSECS;
timerParams.arg = 1;
timerParams.startMode = Timer_StartMode_USER;
//timerParams.priority = 3;

/* sysbios timer */
gTimerHandler = Timer_create(Timer_ANY, TimerIsr, &timerParams, &eb);

if (gTimerHandler == NULL)
{
System_abort("Timer create failed");
}

/* start the MCU Timer */
Timer_start(gTimerHandler);

//???????????????????????//

//???????????????????????//

//???????????????????????//

//???????????????????????//

//???????????????????????//

//Task_delete()


}

------------------------------------------------------------------------------------------------------------------------

Thanks

  • Hi,

    It is my understanding that an explicit task delete is not needed with SYS/BIOS at the end of the task. This reflects in the init tasks of TI out of box demo/ TIREX labs.

    Regards,

    Aayush

  • Hi,

    I try to do more Task_Create();

    I find it will be crash and can't run.

    How do I solve it?

    /* Initialize the Radar App Parameters. */
    Task_Params_init(&taskParams);
    taskParams.priority = 3;
    Task_create(SRR_MSS_initParameter, &taskParams, NULL);

    /* Initialize the PeripheralDevice. */
    Task_Params_init(&taskParams);
    taskParams.priority = 3;
    Task_create(SRR_MSS_initPeripheralDevice, &taskParams, NULL);

    /* Initialize the BiosTimer. */
    Task_Params_init(&taskParams);
    taskParams.priority = 3;
    Task_create(SRR_MSS_initBiosTimer, &taskParams, NULL);

    /* Initialize the Task Parameters. */
    Task_Params_init(&taskParams);
    taskParams.priority = 3;
    Task_create(SRR_MSS_initmmWaveTask, &taskParams, NULL);

    // More to Crash

    /* Initialize the Task Parameters. */
    //Task_Params_init(&taskParams);
    //taskParams.priority = 3;
    //Task_create(SRR_MSS_initmmActiveWaveTask, &taskParams, NULL);

  • Hi,

    It seems like the system is running out of heap to allocate the stacks of various tasks in this case.

    Regards,

    Aayush