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.

Sensorless FOC of PMSM (DRV8312 kit)

This is referencing Build level 4B of sensorless FOC of PMSM. The code for the angle calibration is not provided even though the document details the steps to find it. While it is fairly straight forward to add the steps from the FOC algorithms for other kits, I think TI should add it in the next release. The process detailed in the build guide are identical across all FOC projects, adding the following lines before QEP MACRO is called would make it easier:

 

if (lsw==0) {EQep1Regs.QPOSCNT=0; EQep1Regs.QCLR.bit.IEL = 1;} // Reset position cnt.

 

if ((EQep1Regs.QFLG.bit.IEL==1) && Init_IFlag==0) // Check the index occurrence  

  {qep1.CalibratedAngle= EQep1Regs.QPOSILAT; Init_IFlag++;} // Keep the latched pos. at the first index