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.

AWR2944EVM: Create new task in OOB demo

Part Number: AWR2944EVM

Tool/software:

Hi 

If I'd like to create new task with xTaskCreateStatic(),  I need to declare Task stack size as below.

In addition to the declarations, anything I need to do for memory allocation as well?

/* FreeRTOS Task declarations. */
#define MMWDEMO_INIT_TASK_PRI (1U)

#define MMWDEMO_INIT_TASK_STACK_SIZE (4*1024U)
#define MMWDEMO_MMWAVE_CTRL_TASK_STACK_SIZE (3*1024U)
#define MMWDEMO_DPC_OBJDET_DPM_TASK_STACK_SIZE (4*1024U)
#define MMWDEMO_UART_DATA_EXPORT_TASK_STACK_SIZE (4*1024U)
#ifdef ENET_STREAM
#define MMWDEMO_MMWAVE_ENET_TASK_STACK_SIZE (4*1024U)
#endif
//Added by BruceHu@FIHTDC,2025/2/6
#define MMWDEMO_APPLYPHSHIFT_TASK_STACK_SIZE (4*1024U)

/* Applictaon task stack variables */
StackType_t gAppMainTskStack[MMWDEMO_INIT_TASK_STACK_SIZE] __attribute__((aligned(32)));
StackType_t gMmwCtrlTskStack[MMWDEMO_MMWAVE_CTRL_TASK_STACK_SIZE] __attribute__((aligned(32)));
StackType_t gDpmTskStack[MMWDEMO_DPC_OBJDET_DPM_TASK_STACK_SIZE] __attribute__((aligned(32)));
StackType_t gUartTskStack[MMWDEMO_UART_DATA_EXPORT_TASK_STACK_SIZE] __attribute__((aligned(32)));

Thanks

BRs

Bruce

  • Hello Bruce,

    Apart from adding a task size, you need to assign priority and all other fields appropriately as per the function definition.
    The above task is just aligning the memory thats all, you can add it as well. Most important thing while changing the demo is how you are controlling the priority of the task and where it plugs into your custom code.

    Regards,
    Saswat Kumar