LPC1549 QEI POS and INXCNT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1549 QEI POS and INXCNT

912 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sam@bbinet.com on Thu Aug 27 21:47:03 MST 2015
Has anybody encounter the problem that the POS register never change and the actual position is reported in the INXCNT register instead? So where is the actual index count register?

I had no such problem with the QEI in LPC1768 for another project.

Sam
Labels (1)
0 Kudos
Reply
3 Replies

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Aug 28 09:20:58 MST 2015

Quote: sam@bbinet.com
That's a very strange and unexpected behavior. The user manual is misleading too.



UM:

Quote:
22.6.2.2 QEI Maximum Position register
This register contains the maximum value of the encoder position.



So with MAXPOS  = 0, POS is counting from 0 to 0  :D 
0 Kudos
Reply

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sam@bbinet.com on Fri Aug 28 09:08:06 MST 2015
Good call! Once I set the MAXPOS, POS reports correctly and INXCNT stays at 0. That's a very strange and unexpected behavior. The user manual is misleading too.

Thanks.
Sam.

22.6.2.6
22.6.2.7
22.6.2.8
22.6.2.9
QEI Index Count register
This register contains the current value of the encoder position. Increments or decrements when encoder counts occur, depending on the direction of rotation.
Table 306. QEI Index Count register (INXCNT, address 0x4005 8020) bit description
Bit Symbol Description Reset value
31:0 ENCPOS Current encoder position value. 0
0 Kudos
Reply

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Aug 27 23:41:46 MST 2015

Quote: sam@bbinet.com
Has anybody encounter the problem that the POS register never change and the actual position is reported in the INXCNT register instead?



No :)

Did you set MAXPOS ?
0 Kudos
Reply