I have a problem about the MQX task scheduling

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

I have a problem about the MQX task scheduling

511 次查看
wyflsxy
Contributor II

hello all,

I  used KDS3.0 and based on MQX4.2 and KSDK1.2 project, my board is twrk64f120m,

the task scheduling to me have a little bit of problem

I have add the TCPIP  tasks and it was worked ok before,

But when I add the CAN bus  program to initialization,

it looks like that the task is blocked in lwsem.c as below

could you know what's the problem?

    {

        sem_chk_ptr = (LWSEM_STRUCT_PTR) ((void *) kernel_data->LWSEM.NEXT);

        while (sem_chk_ptr != (LWSEM_STRUCT_PTR) ((void *) &kernel_data->LWSEM))

        {

            if (sem_chk_ptr == sem_ptr)

            {

                /* remove semaphore from kernel LWSEM queue */

                _QUEUE_REMOVE(&kernel_data->LWSEM, sem_ptr);

                break;

            } /* Endif */

            sem_chk_ptr = (LWSEM_STRUCT_PTR) ((void *) sem_chk_ptr->NEXT);

        } /* Endwhile */

    }

0 项奖励
2 回复数

308 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

I guess there is a lwsem  conflict, this lwsem is shared between your can task and tcpip task

Regards

Daniel

0 项奖励

308 次查看
wyflsxy
Contributor II

but I don't have a lwsem shared between and can

I only used lwsem between tcpip init and tcpip send

0 项奖励