HI,
I am working on K21 and K22. in that i need to implement the pulse count, using the FTM quadrature decoder.
i have mapped FTM0_CH1 for receiving the data.
Thank you..
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!
-----------------------------------------------------------------------------------------------------------------------
NOTE! FTM0 is NOT (at least in most Kinetis parts!) QD capable --- check chapter 3 of the appropriate Reference Manual under FlexTimer Configuration, Instantiations-table. And of course quadrature-edge-counting requires two channels, A and B: QD-capable FTMs always seem to be exactly two-channel, so those connect to both 'channel pins'. QD mode DOESN'T, however, use them with any channel LOGIC --- you can use THOSE blocks to capture both edges of an INDEX indication.