AnsweredAssumed Answered

_task_ready() doesn't working on MQX Lite

Question asked by Wenderson Oliveira on Jul 18, 2014
Latest reply on Jul 22, 2014 by Wenderson Oliveira

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

Outcomes