MPC5744P in quadrature decoding A and B two channels can be in two eTimer modules?
In which register to read forward rotation or reverse rotation after MPC5744P quadrature decoding?
Is the value in the CNTR register count after SDK3.0.3ABI quadrature decoding?
Hi,
In quadrature count mode a channel counter will decode the primary and secondary
external inputs as quadrature encoded signals and increment/decrements by one accordingly.
To get count info just read CNTR register.
There is no “flag” which say you if counter is counting up/down in Quadrature count mode. The easiest way how to get the direction is to take two counter samples and calculate the difference.
But you can also do it in HW way; set the output mode for the counter which asserts OFLAG when counting up and clears when counting down. You can use this output as secondary input for other channel within module. If this channel will be stopped, then the CTRL2[INPUT] bit will reflect that direction. If this channel will be started you can also detect the OFLAG edge and generate interrupt on direction change.
BR, Petr
When collecting a high-speed orthogonal signal, the count value is unstable and suddenly changes. How to deal with this?
采集高速正交信号时,计数值不稳定,突然变化。如何处理这个问题?