Strange problem with tasks

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

Strange problem with tasks

1,178 次查看
master_szumi
Contributor III

My problem is vey strange.

 

I started my multi-task application on mqx - and it works fine a while.

After few minutes only one task is active infinitely.

In that task is line: _time_delay(...) so other task shoud be used then.

 

I look to "Task summary" and "Stack usage" and everything is ok (other tasks are "Ready" and stack is not overflow).

 

What shoud I check more?

 

 

0 项奖励
回复
2 回复数

937 次查看
PhilH
Contributor II

The 1000 value is not the problem (I have used it just fine but it adds a bit more clock overhead).  I would guess that your code has some other loop that is spinning.  I would look carefully at the code to locate it.  If you use the default task scheduling, you will not give up the processor unless a higher priority task is ready to run.  What are the priorities of the task that is ready that is not running?  My guess is they have the same priority.

0 项奖励
回复

937 次查看
master_szumi
Contributor III

It seems that scheduler works wrong.

 

In mqx project i'm using:

 

#define BSP_ALARM_FREQUENCY      (1000)

 

It may cause that kind of problem?

 

 

0 项奖励
回复