Dropping this link just incase anyone is interested. For what its worth, I have no professional affiliation with MathWorks outside that of using the software as a student.

Quoted from site -- " In this webinar we feature the development and implementation of a field-oriented controller for a permanent magnet synchronous machine (PMSM) using a real-time microcontroller. The workflow will show you how to: