当前位置: 代码迷 >> 单片机 >> UCOS 死机解决办法
  详细解决方案

UCOS 死机解决办法

热度:313   发布时间:2016-04-28 14:54:05.0
UCOS 死机

我创建了三个任务,

os_err = OSTaskCreateExt((void (*)(void *)) App_TaskKEYSCAN,//按键扫描                          (void          * ) 0,
                          (OS_STK        * )&App_TaskKEYSCANStk[APP_TASK_KEYSCAN_STK_SIZE - 1],
                          (INT8U           ) APP_TASK_KEYSCAN_PRIO,
                          (INT16U          ) APP_TASK_KEYSCAN_PRIO,
                          (OS_STK        * )&App_TaskKEYSCANStk[0],
                          (INT32U          ) APP_TASK_KEYSCAN_STK_SIZE,
                          (void          * ) 0,
                          (INT16U          )(OS_TASK_OPT_STK_CLR | OS_TASK_OPT_STK_CHK));

#if (OS_TASK_NAME_SIZE >= 9)
    OSTaskNameSet(APP_TASK_KEYSCAN_PRIO, "User KEYSCAN", &os_err);
#endif

os_err = OSTaskCreateExt((void (*)(void *)) App_TaskTEST,//啥都没干
                          (void          * ) 0,
                          (OS_STK        * )&App_TaskTESTStk[APP_TASK_TEST_STK_SIZE - 1],
                          (INT8U           ) APP_TASK_TEST_PRIO,
                          (INT16U          ) APP_TASK_TEST_PRIO,
                          (OS_STK        * )&App_TaskTESTStk[0],
                          (INT32U          ) APP_TASK_TEST_STK_SIZE,
                          (void          * ) 0,
                          (INT16U          )(OS_TASK_OPT_STK_CLR | OS_TASK_OPT_STK_CHK));

#if (OS_TASK_NAME_SIZE >= 9)
    OSTaskNameSet(APP_TASK_TEST_PRIO, "User TEST", &os_err);
#endif
  os_err = OSTaskCreateExt((void (*)(void *)) App_TaskGui,//GUI
                           (void          * ) 0,
                           (OS_STK        * )&App_TaskGuiStk[APP_TASK_GUI_STK_SIZE - 1],
                           (INT8U           ) APP_TASK_GUI_PRIO,
                           (INT16U          ) APP_TASK_GUI_PRIO,
                           (OS_STK        * )&App_TaskGuiStk[0],
  相关解决方案