硬汉嵌入式论坛

 找回密码
 立即注册
查看: 90|回复: 1
收起左侧

[FreeRTOS] FreeRTOS无法发生任务调度

[复制链接]

4

主题

19

回帖

31

积分

新手上路

积分
31
发表于 2024-4-23 16:20:36 | 显示全部楼层 |阅读模式
屏幕截图 2024-04-23 161751.png 屏幕截图 2024-04-23 161847.png 屏幕截图 2024-04-23 161854.png

就只会进行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();
                        }
                },不会进行任务调度
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106771
QQ
发表于 2024-4-23 16:33:19 | 显示全部楼层
1、测试的程序代码很简单,不该有问题。是不是模板没移植好。程序里面仅有一个Delay也不行吗
2、这个地方不会卡死,这里不是死循环,应该是调试已经不能正确反馈运行状态了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-5 12:03 , Processed in 0.249306 second(s), 29 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表