cancel
Showing results for 
Search instead for 
Did you mean: 

L6470 abs_pos bit length not as large as literature claims? & busy pin ending early.

joshuahjamesmccrory
Associate II
Posted on May 31, 2016 at 03:18

From the literature, the abs_pos value is a 22 bit 2's complement integer. but when i move the position above 32768 (16 bit 2s complement maximum), the value resets to negative. I.e. the abs_pos value acts as a 16 bit 2s complement value.

 Additionally, using the dSPIN_Move command and using the dSPIN_BUSY to check to make sure it's finished with the move, the busy pin will go high early and the move will not finish. I.e. i will send a dSPIN_Move(''FWD'',4000) and it will only move so far, then stop without completing the commanded move from the abs_pos before the dSPIN_BUSY goes high. Has anyone else has these issues? Some guidance would help, besides these issues, the product works great.

attached is data output from the abs_pos (see line 28774 for example of it ending early) and sample code of how i'm commanding it.

#l6470
2 REPLIES 2
Ken Hashi
Associate
Posted on December 20, 2016 at 03:29

I had the same problem. In my case, I used the ATmega324 as the master device. CPOL and CPHA of SPI were wrong. After CPOL and CPHA were set 1, the abs_pos has been read properly.

Enrico Poli
ST Employee
Posted on January 20, 2017 at 10:40

Hi,

I'm not able to download the attached file, so I cannot check it, but the behavior seems in some way related to how the micro is interpreting the ABS_POS register value.