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
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
Thanks for help!
Have a great day,