Hi, Benjamin,
As you know that there are multiple peripherals which can decode Encoder signal, for example FTM module with quadrature decoder mode, Quadrature Encoder/Decoder module, QuadTimer module...., different processor have different peripherals, what is your part number?
The encoder can output PhaseA/PhaseB even Home and Index signals, the decoder can counts falling/rising edges of PhaseA and PhaseB signals and give position inf and speed inf.
Unfortunately, I have not the source code for PMSM control with Encoder based on Kinetis, but I have the code based on DSC, I attach it, pls refer to it.
Hope it can help you
BR
Xiangjun Rong