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.

TMS320F28P650SH: 操作系统的OSEventPend()函数第一次执行就卡在里面,无法返回出来。中断可以正常执行。

Part Number: TMS320F28P650SH

在代码工程里某个.C文件定义几个变量:

Uint32_t ceshi6;

Uint32_t ceshi7;
Uint32_t ceshi8;
Uint32_t ceshi9;
Uint32_t ceshi10;

这几个变量仅仅定义不使用,代码执行一切正常。如果这几个函数不定义,则异常的现象是操作系统任务的主函数:

while(1)
{
event = OSEventPend();

if(event & (1 << eTaskEventTime)) ,卡在OSEventPend();函数里出不来,中断函数可以正常执行。

补充:有时候在结构体里面多定义或者少定义几个不会使用的成员也会导致这个异常现象,系统栈空间,还有任务栈空间都是足够。