iihj 发表于 2024-4-23 16:20:36

FreeRTOS无法发生任务调度



就只会进行Task3,然后调试卡在#if ( ( configUSE_PREEMPTION == 1 ) && ( configIDLE_SHOULD_YIELD == 1 ) )
                {
                        /* When using preemption tasks of equal priority will be
                        timesliced.If a task that is sharing the idle priority is ready
                        to run then the idle task should yield before the end of the
                        timeslice.

                        A critical region is not required here as we are just reading from
                        the list, and an occasional incorrect value will not matter.If
                        the ready list at the idle priority contains more than one task
                        then a task other than the idle task is ready to execute. */
                        if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
                        {
                                taskYIELD();
                        }
                        else
                        {
                                mtCOVERAGE_TEST_MARKER();
                        }
                },不会进行任务调度

eric2013 发表于 2024-4-23 16:33:19

1、测试的程序代码很简单,不该有问题。是不是模板没移植好。程序里面仅有一个Delay也不行吗
2、这个地方不会卡死,这里不是死循环,应该是调试已经不能正确反馈运行状态了。
页: [1]
查看完整版本: FreeRTOS无法发生任务调度