Thanks, but I am trying to use the same code of the example "Sensorless FOC Motor Control" to have the same control loops and the SVPWM calculations implemented in an efficient way.
Is there a way to modify this code to implement an encoder?
Sensorless FOC Motor control project source code is not released to public. So it will be hard to modify the project. You can refer the AN: http://www.cypress.com/file/157806/download
if it will help with your development.