首先移植了ucosiii,现象是这样的:
1. 没加入emWin的时候,LED可以进行任务交替,LED闪烁
2. 加入emWin之后,任务不执行,LED无现象
程序死在,标红的地方,err值为0x61AE,故有错误
void OS_TickTask (void *p_arg)
{
OS_ERR err;
CPU_TS ts;
p_arg = p_arg; /* Prevent compiler warning */
while (DEF_ON) {
(void)OSTaskSemPend((OS_TICK )0,
(OS_OPT )OS_OPT_PEND_BLOCKING,
(CPU_TS *)&ts,
(OS_ERR *)&err); /* Wait for signal from tick interrupt */
if (err == OS_ERR_NONE) { //err值为0x61AE,OS_ERR_NONE=0
if (OSRunning == OS_STATE_OS_RUNNING) {
OS_TickListUpdate(); /* Update all tasks waiting for time */
}
}
}
}转载
|