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
How do I do this exactly? There is only one output of this module: POSMATCH.
Thank you in advance!
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.
This will not work for my case, because the KV4x does not support the registers LASTEDGEH and POSDPERH.
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.
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.