iMX7D - FTM in Quadrature Decoder mode

0

I am using iMX7D processor for my application( Using Toradex Aster eval board iMX7D 512MB running Win CE 7.0 OS ). I'm trying to use its Flextimer ( FTM ) module in Quadrature decoder mode. Application being and optical encoder is connected to Phase A and Phase B inputs of FTM1 module and FTM counter should run(increment/decrements) based on these inputs.

I have made all the possible combinations to initialise the FTM registers and run the module but it didn't work for me.

When I was going through the reference manual Document Number: IMX7DRM Rev. 1, 01/2018 , i found that there are mistakes in FTM registers in manual too. that i have understood and corrected somehow.

As FTM module is not working with our driver so I want somebody just go through my FTM register settings and point out where we went wrong. FTM register settings are shown below:

CCM_CCGR128 0x00003333  
CCM_TARGET_ROOT 0x10000000  
FTM_SC 0x08 (CLKS = 01) 
FTM_CNT 0x05    
FTM_MOD 0x0000FFFF  
FTM_CNTIN   0x00000000  
FTM_MODE 0x05   (WPDIS = 1  FTMEN = 1)
FTM_QDCTRL  0x01    (QUADEN = 1 )

Is there any requirement to enable module clock for FTM (CCM registers) and enabling clock in FTM_SC register specially for Quadrature decoder mode ?

Is there any sequence for FTM registers initialisation ?

From Figure 12-6. FTM block diagram of reference manual, I understand there is no requirement of clock for FTM module in quadrature decoder mode. so I tried disabling the FTM clock also. When enabled - FTM_CNT start increment even without input FTM_PHA and FTM_PHB pins. When Disabled - FTM_CNT remains 0 even if I was giving encoder pulses on FTM_PHA and FTM_PHB pins.

Also I would like to know that, Is there any ERRATA in FTM module in iMX7Dual processor ?

Regards Bipin Kumar

windows-ce
pwm
imx6
nxp-microcontroller
motordriver
asked on Stack Overflow Nov 20, 2018 by BKT • edited Nov 20, 2018 by halfelf

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0