_task_ready() doesn't working on MQX Lite

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

_task_ready() doesn't working on MQX Lite

ソリューションへジャンプ
925件の閲覧回数
wendersonolivei
Contributor IV

Hi all !

I'm learning about MQX Lite, but it's really hard due to lack of documentation about that.

Recently, I had a problem with "task switch". Basicly, I'm running into a task_1 and this call a _task_block(); .Right after that, my task_2 (with same priority) becomes active and runs a _task_ready function to make task_1 be ready again.

But, when I call _task_ready, my microcontroller seems like have lost itself, and what I see in debug window is the firmware paused on  PE_DEBUGHALT();

There is the code of two tasks:

void read_task(uint32_t task_init_data)

{

  for(;;)

  {

  _task_block();

  }

}

void write_task(uint32_t task_init_data)

{

  for(;;)

  {

       _task_ready(read_task); //Try to make "read_task" ready

  }

}

> I'm running this on FRDM - KL25Z

Can anyone help me? Thanks

タグ(3)
0 件の賞賛
返信
1 解決策
675件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

The prototype is

void _task_ready (pointer td);

td is pointer to the task descriptor of the task to be made ready.

you can use

TD_STRUCT_PTR td_ptr = _task_get_id(tid);

_task_ready(td_ptr);

You can check the Freescale MQX Lite RTOS reference manual and user guide for more details.

C:\Freescale\CW MCU v10.6\MCU\Help\PDF\


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
676件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

The prototype is

void _task_ready (pointer td);

td is pointer to the task descriptor of the task to be made ready.

you can use

TD_STRUCT_PTR td_ptr = _task_get_id(tid);

_task_ready(td_ptr);

You can check the Freescale MQX Lite RTOS reference manual and user guide for more details.

C:\Freescale\CW MCU v10.6\MCU\Help\PDF\


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
675件の閲覧回数
wendersonolivei
Contributor IV

Thanks for help!

Have a great day,

0 件の賞賛
返信