Other Parts Discussed in Thread: INSTASPIN-BLDC
最近买了套TI的开发套件,在看InstaSPIN_BLDC算法,其中看到drv.h文件中的函数 InstaSPIN_BLDC_Calc(obj->instaHandle);时非常不理解,一步一步往下追溯就是这个函数了bemfnegint_calc(v);
inline void bemfnegint_calc(H_INSTASPIN_BLDC v)
{
v->commTrig = NO;
if(v->vIntLockout == YES)
{
if(*(v->vPhase) > 0)
{
v->vIntLockout = NO;
}
}
else
{
v->vInt += *(v->vPhase); // Integrate the phase voltage
if(v->vInt < 0) // Only integrate negatively
{
if(v->vInt < -(v->intThreshold)) // Check to see if there is enough volt-seconds to commutate
{
v->vIntLockout = YES;
v->commTrig = YES;
v->vInt = 0;
}
}
else
{
v->vInt = 0;
}
}
}
这其中的vInt,intThreshold,vIntLockout都是干吗的啊,有没有讲解这些代码的参考手册,或者能不能讲下 InstaSPIN_BLDC_Calc(obj->instaHandle);的大致程序流程,十分感谢~