FTM Quad Decoder and Reference Manual

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FTM Quad Decoder and Reference Manual

2,353件の閲覧回数
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.

ラベル(1)
4 返答(返信)

2,118件の閲覧回数
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 件の賞賛
返信

2,118件の閲覧回数
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 件の賞賛
返信

2,118件の閲覧回数
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

2,118件の閲覧回数
Keith4DSmith
Contributor V

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

0 件の賞賛
返信