Part Number: DRV10987
hi,
i saw that in the firmware for drv10987 you use the function Get_SPD_Feedback
i attached the function here:
int Get_SPD_Feedback()
{
unsigned int Temp;
Temp = DRV10987Q_Read(DRV10987Q_MotorPeriod_Reg) ;
if (Temp == 0) Temp = 40000;
Temp = 10922667/(long)Temp;//2^14*1000*1000/M_CloseMax_Spd
//Temp = (Temp << 14)/M_CloseMax_Spd; //Q14 Norminize
//if(Temp==0) Temp =40000;
//Temp = ((long)0x01298000/Temp) - 66;
return Temp;
}
i will be happy to get some explanation about this function.
1. i didnt understand why temp gets 40000 if temp ==0 ?
2. i saw that you got to this number 10922667 while M_CloseMax_Spd=1500
why you multiply 2^14*1000*1000 what is the meaning of each number?
what is the 2^14 represent?
i attached the function here:
int Get_SPD_Feedback()
{
unsigned int Temp;
Temp = DRV10987Q_Read(DRV10987Q_MotorPeriod_Reg) ;
if (Temp == 0) Temp = 40000;
Temp = 10922667/(long)Temp;//2^14*1000*1000/M_CloseMax_Spd
//Temp = (Temp << 14)/M_CloseMax_Spd; //Q14 Norminize
//if(Temp==0) Temp =40000;
//Temp = ((long)0x01298000/Temp) - 66;
return Temp;
}
thanks, liraz