硬汉嵌入式论坛

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

[emWin] 图形任务卡死了--版主关注一下

[复制链接]

25

主题

58

回帖

133

积分

初级会员

积分
133
发表于 2020-2-18 09:59:30 | 显示全部楼层 |阅读模式
我现在做的图形库,一直在完善显示界面的功能

但是在在线调试芯片的时候,是不是会发现图形界面卡死了。然后我就会发现,程序运行在下面的函数这里就不动了。
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
{
ListItem_t *pxIterator;
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;

        /* Only effective when configASSERT() is also defined, these tests may catch
        the list data structures being overwritten in memory.  They will not catch
        data errors caused by incorrect configuration or use of FreeRTOS. */
        listTEST_LIST_INTEGRITY( pxList );
        listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );

        /* Insert the new list item into the list, sorted in xItemValue order.

        If the list already contains a list item with the same item value then the
        new list item should be placed after it.  This ensures that TCB's which are
        stored in ready lists (all of which have the same xItemValue value) get a
        share of the CPU.  However, if the xItemValue is the same as the back marker
        the iteration loop below will not end.  Therefore the value is checked
        first, and the algorithm slightly modified if necessary. */
        if( xValueOfInsertion == portMAX_DELAY )
        {
                pxIterator = pxList->xListEnd.pxPrevious;          -------->>top here!!!!------>>
        }
        else
        {
                /* *** NOTE ***********************************************************
                If you find your application is crashing here then likely causes are
                listed below.  In addition see http://www.freertos.org/FAQHelp.html for
                more tips, and ensure configASSERT() is defined!
                http://www.freertos.org/a00110.html#configASSERT

                        1) Stack overflow -
                           see http://www.freertos.org/Stacks-and-stack-overflow-checking.html
                        2) Incorrect interrupt priority assignment, especially on Cortex-M
                           parts where numerically high priority values denote low actual
                           interrupt priorities, which can seem counter intuitive.  See
                           http://www.freertos.org/RTOS-Cortex-M3-M4.html and the definition
                           of configMAX_SYSCALL_INTERRUPT_PRIORITY on
                           http://www.freertos.org/a00110.html
                        3) Calling an API function from within a critical section or when
                           the scheduler is suspended, or calling an API function that does
                           not end in "FromISR" from an interrupt.
                        4) Using a queue or semaphore before it has been initialised or
                           before the scheduler has been started (are interrupts firing
                           before vTaskStartScheduler() has been called?).
                **********************************************************************/

                for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM.  This is checked and valid. */
                {
                        /* There is nothing to do here, just iterating to the wanted
                        insertion position. */
                }
        }

        pxNewListItem->pxNext = pxIterator->pxNext;
        pxNewListItem->pxNext->pxPrevious = pxNewListItem;
        pxNewListItem->pxPrevious = pxIterator;
        pxIterator->pxNext = pxNewListItem;

        /* Remember which list the item is in.  This allows fast removal of the
        item later. */
        pxNewListItem->pvContainer = ( void * ) pxList;

        ( pxList->uxNumberOfItems )++;
}



请问这个函数是做什么用的,为什么会停止在这里?

[url=]图片[/url]
函数图.jpg
回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115787
QQ
发表于 2020-2-18 13:34:51 | 显示全部楼层
仅看你的描述,看不出问题的大概方向。


建议直接下载测试,别用调试状态。

回复

使用道具 举报

25

主题

58

回帖

133

积分

初级会员

积分
133
 楼主| 发表于 2020-4-7 17:32:47 | 显示全部楼层
直接下载也是会死掉。感觉整个系统都挂掉了。
回复

使用道具 举报

25

主题

58

回帖

133

积分

初级会员

积分
133
 楼主| 发表于 2020-4-7 17:46:04 | 显示全部楼层
eric2013,系统死掉了,
键盘任务,图形任务,数据处理任务都挂掉了。

设置断点都没有反应。

只有
void SysTick_Handler(void)
{
  osSystickHandler();
}

void LTDC_IRQHandler(void)
{
  HAL_LTDC_IRQHandler(&hltdc);
}

两个中断还在运行。。

回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115787
QQ
发表于 2020-4-8 00:53:40 | 显示全部楼层
wxqhit 发表于 2020-4-7 17:46
eric2013,系统死掉了,
键盘任务,图形任务,数据处理任务都挂掉了。

笨办法,逐步排查吧。
回复

使用道具 举报

29

主题

231

回帖

318

积分

高级会员

积分
318
发表于 2020-4-8 08:38:22 | 显示全部楼层
这个标题牛,硬汉我这个月没工资发了,请关注下~
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-18 22:04 , Processed in 0.267203 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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