QMI8658A Datasheet Rev A-勘误表
- 1. Reset Register
- 2. CTRL9 Command List
- 3. Temp Sensor Output
1. Reset Register
在5.9章节 和 7.4 章节对复位操作的写入数据,有笔误
正确的数据是: 0xB0
2. CTRL9 Command List
在 5.10.2 章节 Table 28. List of CTRL9 Commands 中为定义 0x01,0x02,0x03,0x06,0x07 位相关信息,而在驱动样例中有定义了
enum Qmi8658_Ctrl9Command
{
Qmi8658_Ctrl9_Cmd_NOP = 0X00,
Qmi8658_Ctrl9_Cmd_GyroBias = 0X01,
Qmi8658_Ctrl9_Cmd_Rqst_Sdi_Mod = 0X03,
Qmi8658_Ctrl9_Cmd_Rst_Fifo = 0X04,
Qmi8658_Ctrl9_Cmd_Req_Fifo = 0X05,
Qmi8658_Ctrl9_Cmd_I2CM_Write = 0X06,
Qmi8658_Ctrl9_Cmd_WoM_Setting = 0x08,
Qmi8658_Ctrl9_Cmd_AccelHostDeltaOffset = 0x09,
Qmi8658_Ctrl9_Cmd_GyroHostDeltaOffset = 0x0A,
Qmi8658_Ctrl9_Cmd_EnableExtReset = 0x0B,
Qmi8658_Ctrl9_Cmd_CopyUsid = 0x10,
Qmi8658_Ctrl9_Cmd_SetRpu = 0x11,
Qmi8658_Ctrl9_Cmd_Dbg_WoM_Data_Enable = 0xF8,
};
依数据手册为准,忽略 Qmi8658_Ctrl9Command
枚举的字段
3. Temp Sensor Output
在5.9章节给出温度计算公式为
正确的温度数据的读取计算
float qmi8658_readTemp(void)
{
unsigned char buf[2];
short temp = 0;
float temp_f = 0;
qmi8658_read_reg(Qmi8658Register_Tempearture_L, buf, 2);
temp = ((short)buf[1]<<8)|buf[0];
temp_f = ((float)temp/256.0f)-5.2;
return temp_f;
}