Hi Team,
The customer found that the __meallow(); function is missing in the official routine of the motor control library about IDDK to implement FCL. He put the mouse on this function, and then press and hold the F3 key, the CCS software pops up Could not find symbol'_meallow' in index. Customer would like to know how does the routine realize its function? Could it be that this __meallow() function is already built into the chip, and then this function is called directly? Or is it some other reason?
else if(lsw == ENC_WAIT_FOR_INDEX) //ENC_WAIT_FOR_INDEX = 1 ENC等待索引状态
{
//
// lsw = ENC_WAIT_FOR_INDEX ---> Waiting for QEP index as rotor spins
// Detect the offset angle between alpha axis and QEP index location
// If QEP index pulse is found :-
// POSILAT captures POSCNT at the first INDEX pulse.
// Load POSINIT with POSILAT, so that at every future INDEX event,
// POSCNT is loaded (reset) with POSINIT
//
__meallow();
//
// Check the index occurrence
//
if(ClaQep.ptr->QFLG.all & CLA_QEP_FLAG_IEL_EVENT) // QFLG.bit.IEL
{
__mdebugstop();
//
// QPOSILAT updates on Index edge(IEL) - capture it into QPOSINIT
//
ClaQep.ptr->QPOSINIT = ClaQep.ptr->QPOSILAT;
//
// make QPOSCNT = QPOSINIT on future Index edge(s)
// ClaQep.ptr->QEPCTL.bit.IEI = IEI_RISING;
//
ClaQep.ptr->QEPCTL.all |= IEI_RISING;
//
// if QEP index pulse is found, change lsw to 'ENC_CALIBRATION_DONE'
//
lsw = ENC_CALIBRATION_DONE;
}
Thanks,
Annie