KV4x: ENC driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

KV4x: ENC driver

1,302 次查看
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

标签 (1)
0 项奖励
5 回复数

1,247 次查看
lenoirlaw
Contributor I

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

 

Thank you in advance!

0 项奖励

1,228 次查看
_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 项奖励

1,218 次查看
lenoirlaw
Contributor I

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

0 项奖励

1,211 次查看
_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 项奖励

1,259 次查看
_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 项奖励