AnsweredAssumed Answered

MQX task scheduling

Question asked by Lakshmi Singh on Apr 27, 2010
Latest reply on Apr 29, 2010 by Juraj Vanco

Hi,

 

I have written  simple code to creat two tasks, one task is to write to UART (interrupt driven) & another task is to read a character from UART (interrupt driven) & echo back to HyperTerminal to display to the user.

 

I am using MCF52233-Rev F demo board for testing purpose.

 

When the control goes to read_task, I have a while loop over there, I want to switch back to write_task, after the timeslice of 1ms is expired.I want to see continuous switching from one task to another, but I am unable to see so.

 

Please check the code attached & give a feedback as to where I am going wrong.

 

As per my understanding from MQXUG, if the task is declared as follows, MQX_SCHED_RR else MQX_SCHED_FIFO

 

 

const TASK_TEMPLATE_STRUCT  MQX_template_list[] = {     /* Task Index,   Function,   Stack,  Priority, Name,     Attributes,          Param, Time Slice */    { READ_TASK,     read_task, 1000,   4,        "Read",  MQX_AUTO_START_TASK,  0,     0 },    { WRITE_TASK,   write_task, 1000,   5,        "Write",  MQX_TIME_SLICE_TASK,    0,     100 },    { 0 }};

 

 

But I am unable to see task switching.

 

Please Help

 

Thanks

 

 

Outcomes