K21 and K22 FTM quadrature decoder.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K21 and K22 FTM quadrature decoder.

644 Views
husainsab1
Contributor I

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..

Labels (1)
0 Kudos
2 Replies

392 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi husain,

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

FTM Instantiations.png

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

ftm_quad_decoder.png

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

Select K22.png

Download SDK_2.1_FRDM-K22F.png
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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

392 Views
egoodii
Senior Contributor III

QEI inputs, and index capture 

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.

0 Kudos