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