FTM Quad Decoder and Reference Manual

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

FTM Quad Decoder and Reference Manual

981 Views
Keith4DSmith
Contributor V

In the K22P144M120SF5V2RM reference manual, the documentation for the FTM controller list four FTMx_QDCTRL registers, FTM0_QDCTRL, FTM1_QDCTRL, FTM2_QDCTRL, and FTM3_QDCTRL.

It is documented that only FTM1 and FTM2 can be used for quadrature decoding in the K22.

This does create some confusion.

Labels (1)
4 Replies

746 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Keith:

Yes, compared with the FTM0 and FTM3 configuration, the FTM1 and FTM2 configuration adds the Quadrature decoder feature and reduces the number of channels.

For FTM0 and FTM3, the control registers for that feature are present. which means you will need to create your own quadrature decoder software functions or use the help of external hardware for the decoders.

Regards

Daniel

0 Kudos

746 Views
Keith4DSmith
Contributor V

Thank you. If the control registers are present, and there are GPIO/input pins from a quad decoder assigned to CHAN0/1 what software functions are required?

Without FTM quadrature decoding, one can use GPIO dma or interrupt and software transitions through 00,01,10,11 states to determine +1 or -1.

How would setting up FTM0 or FTM3 quad decode registers improve the direct GPIO method?

0 Kudos

746 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Keith:

Please refer to my attached document.  which described multiple features of the FTM and provides some reference code for Quadrature decoder.

AN5142: Features of the FlexTimer Module

I hope it helps

Regards

Daniel

746 Views
Keith4DSmith
Contributor V

Thank you. The app note is very in-depth.

0 Kudos