PE, Round Robin

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PE, Round Robin

365 Views
rajbatra
Contributor IV

What's the recommended way of creating an MQx task in KDS? I was expecting it to be through OS_Task in the component library via processor expert. However, I want to create a time sliced task but processor expert seems to only support the attribute for 'Floating point task'.

 

Is there a field to wedge the MQX_TIME_SLICE_TASK attribute or do I forget about using PE for tasks and create them manually?

 

Thanks,

-Raj

Labels (1)
0 Kudos
1 Reply

234 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Raj,

MQX creates a task template structure as follows:

const TASK_TEMPLATE_STRUCT  MQX_template_list[] =

{

   /* Task Index,   Function,   Stack,  Priority, Name,     Attributes,          Param, Time Slice */

    { WORLD_TASK,   world_task, 700,   9,        "world",  MQX_AUTO_START_TASK, 0,     0 },

    { HELLO_TASK,   hello_task, 700,   8,        "hello",  0,                   0,     0 },

    { 0 }

};

The last element of each structure is the time slice. If you set this value the scheduling policy will be Round Robin, if not it is FIFO.

If you are using classic MQX please see  chapter 3.4.2 Round Robin Scheduling of MQX_User_Guide.pdf located in C:\Freescale\Freescale_MQX_4_2\doc\mqx

If you are using MQX for KSDK you must see at the same chapter of MQX RTOS for Kinetis SDK User's Guide.pdf located in C:\Freescale\KSDK_1.2.0\doc\rtos\mqx

Best regards,

Carlos

0 Kudos