您的位置:首页 > 其它

[TI DLP Buglist]data type error in illum_EnableIllumination function

2013-08-06 16:01 471 查看
I am debuging my code today, I find when my code is running, it's stop at illum_EnableIllumination().

After check it, I find my code is in a infinite loop, why it happen?

Just because there is an data type error in the counter, just look at code:

uint08 TimeoutCount = 0;

while ( (!SEQ_GetPhaseLockedToColorWheelIndex()) && TimeoutCount < 1000)
{
TimeoutCount++;

TMR_Delay(300);


so when the sequency phase locked is failed, then it will be always a infinite loop.

how to fix it? just change the variable 'TimeoutCount' from uint08 to uint16.

and i also suggest you print a error message if TimtoutCount is bigger or equal to 1000.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐