Encoder counting on FTM of KV58F

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

Encoder counting on FTM of KV58F

488 Views
a8Chcx
Contributor V

Hi,

I am trying to use demo application to do encoder(PhA and PhB) on FTM1 and FTM2 of KV58F.

I found the counting is related to "ftmInfo.prescale = kFTM_Prescale_Divide_32;//kFTM_Prescale_Divide_32;"

If I use kFTM_Prescale_Divide_1, I got much more counting. Why? It should not be related to FTM clock, right?

Thanks,

Christie

0 Kudos
2 Replies

318 Views
a8Chcx
Contributor V

Hi,

I set INIT=0, MOD=65535 in sample project.

If I select pre_scale=1, the counts I get are 32 times of pre-scale=32.

Can anybody tell me why? My understanding is that the counts should be the same?

Thanks,

Christie

0 Kudos

318 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Christie,

Please refer the 'Figure 44-3. FTM block diagram' in KV5XP144M240RM.

FTM block diagram.png

The FTM counter clock is the selected clock divided by the prescaler.

Prescaler.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos