Can the unit of Task time slice be changed?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Can the unit of Task time slice be changed?

跳至解决方案
2,823 次查看
george
Senior Contributor II

Hi all,

I'm using MQX 3.8.1 on TWR-K60N512.

And, the scheduling of MQX Task uses Round robin.

I want to set the Time slice of Tasks to 100uSec.

Is the setting possible?

If possible, please tell me the way.

Best regards,

George

1 解答
2,151 次查看
JuroV
NXP Employee
NXP Employee

Hello,

the default time slice unit is number of ticks. Ticks are set by the frequency of the system timer in the <board>.h file.

在原帖中查看解决方案

7 回复数
2,151 次查看
Swapnil_Enable
Contributor III

u can set it by changing the Task Templete. Please refer 3.2.20 in MQXRM pdf or 3.2.2 in MQXUG.pdf.

location would be C:\Program Files\Freescale\Freescale MQX 3.8\doc\mqx

ex:

{INIT_TASK,        init_Task,      800,   9,  "initTask",  MQX_AUTO_START_TASK, 0, 100},

the bold on will change the time slice of task.

0 项奖励
回复
2,151 次查看
george
Senior Contributor II

Hi Katre,

In my understanding, The default time unit of slice is milliseconds.

I want to set time slice fewer than the minimum which can set it.

Plase tell me how to change to microsec from millisec.

Best Regards,

George

0 项奖励
回复
2,152 次查看
JuroV
NXP Employee
NXP Employee

Hello,

the default time slice unit is number of ticks. Ticks are set by the frequency of the system timer in the <board>.h file.

2,151 次查看
Swapnil_Enable
Contributor III

Thanks Juraj, George i to agree with him, as per my knowledge....the time setting works on ticks so u can make it to microsec....u need to do some calculation to get ur desired number

0 项奖励
回复
2,151 次查看
george
Senior Contributor II

Thanks Juraj and Swapnil,

Is the parameter which you say the following?

  #ifndef BSP_ALARM_FREQUENCY

      #define BSP_ALARM_FREQUENCY             (200)

  #endif

Is my understanding correct?

Best Regards,

George

0 项奖励
回复
2,151 次查看
JuroV
NXP Employee
NXP Employee

Yes, that's the parameter.

0 项奖励
回复
2,151 次查看
george
Senior Contributor II

Thanks Juraj,

0 项奖励
回复