Hi,
I am using KDS3.2 and KSDK 1.3 with KMS and I need a quadrature driver in order to measure thevelocity of a wheel. There is no examples in KSDK 1.3 examples' folders and the qei_sys.h,created by KMS, is a little bit confusing yet. So, is there any examples regarding quadrature encoders?
If not, regarding qei_sys.h generated by KMS. I have some doubts:
1) in function: void QEIS_init(uint16_t qeiMaxPosCount){
...
/* set the maximum count value equal to (4 * encoderLines) - 1 */
FTM_HAL_SetMod(FTM_ENCODER_BASE, qeiMaxPosCount);
}
What do you mean by encoder lines?
2) The function:
uint16_t QEIS_readPositionCounter(void)
{
return FTM_HAL_GetCounter(FTM_ENCODER_BASE);
}
gives me a position counter, that does not represent velocity.
How can I obtain the velocity from this API?
Thanks in advance!