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.

TMS320F28069M: Improve QEP calibration

Part Number: TMS320F28069M

Hi TI team, 

We are putting in place the sensored FOC capability, I am now using the following code for encoder initialization :

	// If we are forcing alignment, using the Rs Recalculation, align the eQEP angle with the rotor angle
	CTRL_Obj *obj = (CTRL_Obj *)mc_ctrlHandle;
	if (EST_getState(obj->estHandle) == EST_State_Rs)
	{
		ENC_setZeroOffset(mc_encHandle, (uint32_t)(qep_GetMaximumPositionCounter() - qep_GetPositionCounter()));
	}

how can we improve this step please ?

Thanks