Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 231904

Forum Post: RE: MSPM0G3507: MSPM0G3507 QEI zero index detection in SW

$
0
0
Maybe I missed it but I see no way to preload the counter value to some on start-up. It seems to start out at the load value or zero, it is difficult to tell. The load value in this case is the value that the counter wraps to when counting down through zero or wraps from when counting up toward zero. So the load value defines the number of bits in the position measurement. If I am correct in this, then there is no way to initially have the counter at a value that is far from zero since the load value is basically -1. I disabled my zero pulse by tying it high and still get the zero event interrupt so my observation about getting the interrupt when the counter goes through zero is correct. A note: in my case, the counter is 16 bits and I am using all 16 bits so a value out of operating range is not possible. Without being able to positively define the starting point, there is no way to guarantee that the zero index will be encountered when the counter isn't already close enough to zero to not be able to detect the change in SW. If precise absolute positioning is essential, then even a few bits of error could be significant. So I see no SW solution out of this. Of course, as soon as the zero pulse is encountered, the position is correct, but without knowing when the zero pulse has been encountered, the system could lock onto an incorrect position, thinking it has encountered the zero index. Isn't there some way to 'know' with no ambiguity that the zero index has been encountered without connecting it to a separate GPIO in addition to the zero index input?

Viewing all articles
Browse latest Browse all 231904

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>