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.
如下两个函数:第二行的语句跑起来没有问题,但是只要加上第一句就会跑进ILLEGAL ISR里面去,怎么回事?
// statemachine.timer(&statemachine);//illegal
pro.timer1(&pro);
函数体如下:
void StateMachineTimer(STATEMACHINE_DATA *p)
{
if(p->SM_Timer<0xfffffff0)
p->SM_Timer++;
if(p->Vdc>50)
{
if(p->MainRlyOnTimer<60000)
p->MainRlyOnTimer++;
else
p->MainRlyOnTimer=0;
p->MainRlyOffTimer=0;
}
else
{
if(p->MainRlyOffTimer<60000)
p->MainRlyOffTimer++;
else
p->MainRlyOffTimer=0;
p->MainRlyOnTimer=0;
}
}