Current example code doesn't have the option to enable torque control. Theoretically you can apply the PID control on Iq (torque is proportional to Iq) instead of the speed of motor. But implementing this should need significant modification in the code.
Hi Can you point me to the full source code of the sensor-less FOC binary library which is provided for the psoc 4 and power board 037?
The git hub version I found is the same as the example version which has BLDC Ke input for flux level etc.
Also do you know is there a sine table that has 3-rd harmonics for the modulation? ( again this part is missing from the source code only binary library).