Hi husain,
Please check the chapter 3 in Reference Manual first to ensure wheteher the FTM module has the Quadrature decoder feature or not.

You can refer the demo "ftm_quad_decoder" in KINETIS-SDK.

For example: search K22 then select FRDM-K22F and download SDK_2.1_FRDM-K22F.


You can getting start with KSDK reading "How to start with KSDK".
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------