This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

程序无法切换,时间中断不能定时触发



程序基本架构,CLK函数作为硬件时间中断,每隔200us运行一次,运行SEM_post.然后task1在等待到SEM0发送后执行函数,最后切换到task2,运行后切换到task3.程序基本例程如下

void  clk()

{

//采用时间中断,每200us执行一次

SEM_post(&SEM0);

}

void  task1()

{

for(;;){

SEM_pend(&SEM0,SYS_FOREVER);

//function

SEM_post(&SEM1);

TSK_yield();

}

}

void  task2()

{

for(;;){

SEM_pend(&SEM1,SYS_FOREVER);

//function

TSK_yield();

}

}

以上程序在DEMO中(没有function功能函数添加)运行很正常。但是在实际程序中,CLK-task1-task2之后就开始运行空循环了,不再进入CLK,检查结构也查不出什么,请问能帮忙看看从哪里下手查原因吗?谢谢