KV4x: ENC driver

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

KV4x: ENC driver

1,254 Views
lenoirlaw
Contributor I

Hi,

I am new to the field of embedded systems. I have a MKV46F16 µC on a board. I have to connect an encoder and implement a module to get the position and speed of a motor. The problem is that I only have the PTC4...PTC7 pins available. The FTM1 has a Quadrature decoder feature, but the specific pins are not at PTC4...PTC7. So unfortunately i can't use the FTM module.  For this reason I use the ENC module, but I can't find the timer register to get timestamps to determine the speed. 

What is the best way to proceed?

 

Thank you in advance and best regards,

lenoirlaw

Labels (1)
0 Kudos
5 Replies

1,199 Views
lenoirlaw
Contributor I

How do I do this exactly? There is only one output of this module: POSMATCH. 

 

Thank you in advance!

0 Kudos

1,180 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi Lenoirlaw,

The RT1050 has a similar or even the same module. In its reference manual, it explains the speed measurement method in more detail (Please see section 55.3.4 Speed Measurement Method).

i.MX RT1050 Processor Reference Manual

I hope it helps you. If you still have questions about it, please let me know.

0 Kudos

1,170 Views
lenoirlaw
Contributor I

This will not work for my case, because the KV4x does not support the registers LASTEDGEH and POSDPERH.

0 Kudos

1,163 Views
_Leo_
NXP TechSupport
NXP TechSupport

Apologies. That's correct, the KV4x does not support these registers.

In such a case, you will need to create an algorithm using a general purpose timer as the time base connected to the TRIGGER and take a snapshot of the POSD register in order to calculate speed. Wish it helps you.

0 Kudos

1,211 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi Lenoirlaw,

You can connect signals of this module to a general purpose timer to make speed velocity measurements.

Wish it helps you. If you still have questions about it, please kindly let me know.

0 Kudos