AnsweredAssumed Answered

L6472, problem with absolute position register

Question asked by heder.jacob on Feb 10, 2017
Latest reply on Feb 16, 2017 by Enrico Poli

Hi

 

I'm using the L6472 Eval board, revision 1.1.

 

We got two L6472 Eval board connected to our main stm32f2 board. Both drivers are running smoothly and everything is working, but reading the absolute position register makes no sense.  The absolute register seems to have some faulty bits, which is hardwired to 0.  I'm using the c driver which weremade by ST. (dspin.c)

 

When reading the absolute position register (called ABS_POS in the datasheet) is in 2's complement format and it ranges from -2^21 to +2^21-1.  I'm using the dspin.c driver to read this value (see below) but I do not get the correct value.  I'v also got the new L6472 DISC eval board and tryed it via windows and here the ABS_POS seems to work.

 

I'm currently moving the motor without checking if my position is correct. However due to safety reason I need to

known the absolute positon.

 

Is this an chip issue on some older chips ? ..  Any workarounds ?

 

Regards Jacob.

 

 

--- 

 

/* Issues dSPIN Get Param command. */
uint32_t dSPIN_Get_Param(dSPIN_Registers_TypeDef param)
{
int32_t temp = 0;
int32_t rx = 0;


/* Send GetParam operation code to dSPIN */
temp = dSPIN_Write_Byte((uint8_t)dSPIN_GET_PARAM | (uint8_t)param);
/* MSB which should be 0 */
temp = temp << 24;
rx |= temp;
switch (param)
{
case dSPIN_ABS_POS: ;
case dSPIN_MARK: ;
case dSPIN_SPEED:
temp = dSPIN_Write_Byte(device,(uint8_t)(0x00));
temp = temp << 16;
rx |= temp;
case dSPIN_EL_POS: ;
case dSPIN_ACC: ;
case dSPIN_DEC: ;
case dSPIN_MAX_SPEED: ;
case dSPIN_MIN_SPEED: ;
case dSPIN_FS_SPD: ;
case dSPIN_CONFIG: ;
case dSPIN_STATUS:
temp = dSPIN_Write_Byte(device,(uint8_t)(0x00));
temp = temp << 8;
rx |= temp;
default:
temp = dSPIN_Write_Byte(device,(uint8_t)(0x00));
rx |= temp;
}

return rx;
}

Outcomes