QMI8658C
QMI8658C
ΣΔ
Gz DMA Controller
A/D
Self SDO/SA0
Test I2C, I3C, SPI CS
Align M0+ Host, Slave or UI
Interface SCL
Mag MCU
I2C Master SDA
or SPI
Data Sync CLK
Aux / OIS Bias
Domain Synth
Interface
Figure 4. Pins Face Down (Top View) Figure 5. Pins Face Up (Bottom View)
Pin Type Pin Name Mode 1 Function (Default Mode 2 Function (External Sensor
Number Mode) Mode)
Notes:
1. This pin has an internal 200 kΩ pull up resistor.
2. In SPI mode (not in I2C Mode), there is an internal pull down 200 kΩ resistor.
3. Refer to Section 12 for detailed configuration information.
A restricted-use license for use of XKF3 for commercial Flexible use Scenarios, North Referenced,
purposes is also granted for certain applications when Unreferenced
XKF3 is used with the QMI8xxx series of IMUs, such as Extensive Status Reporting for Smooth Integration in
the QMI8658C/B/C family and the QMI8610. Applications
Optimized Library for Popular Microcontrollers
2.4 Frames of Reference and counterclockwise direction around the respective axis are
considered positive. Magnetic fields (mx, my, mz) can be
Conventions for Using QMI8658C configured to be expressed in the sensor X-Y-Z
The QMI8658C uses a right-handed coordinate system coordinates as well. Care must be taken to make sure
as the basis for the sensor frame of reference. that QMI8658C and the magnetic sensor of choice are
Acceleration (ax, ay, az) are given with respect to the X-Y- mounted on the board so that the coordinate systems of
Z co-ordinate system shown above. Increasing the two sensors are substantially parallel. Figure 7 shows
accelerations along the positive X-Y-Z axes are the various frames of reference and conventions for using
considered positive. Angular Rate (ωx, ωy, ωz) in the the QMI8658C.
Note:
7. System Turn On Time starts once VDDIO and VDD are within 1% of Final Value.
Note:
8. System Turn On Time starts once VDDIO and VDD are within 1% of Final Value
Typical
Subsystem Parameter Scale Unit Comments
Sensitivity
Setting
Typical
Magnetometer Sensitivity Depends on Depends on
Sensor LSB/gauss
Scale Factor magnetometer magnetometer
Mode
Magnetometer Sensitivity Depends on Depends on
LSB/gauss
Scale Factor magnetometer magnetometer
16 Bit Output
AE Mode Orientation Increment
(quaternion) Sensitivity ±1 16,384 LSB/unit
Scale Factor
Velocity Increment
±32 1,024 LSB/ms
Sensitivity Scale Factor
Current Consumption
VDD = VDDIO = 1.8 V, T = 25°C unless otherwise noted. IDD Current refers to the current flowing into the VDD pin.
Typical numbers are provided below.
Table 14. Current Consumption for Accelerometer Only Typical Sensor Mode (Gyroscope
Disabled)
Mode High-Resolution Low-Power Unit
ODR 1000 500 250 125 62.5 31.25 128 21 11 3 Hz
Filters Disabled
Typical 182 155 142 134 133 132 55 42 35 30
(aLPF=0)
Overall IDD µA
Current Filters Enabled
182 155 142 134 133 132 55 42 35 30
(aLPF=1)
Table 15. Current Consumption for Gyroscope Only Typical Sensor Mode (Accelerometer
Disabled)
Mode High-Resolution Unit
ODR 8000 4000 2000 1000 500 250 125 62.5 31.25 Hz
Filters
Typical Disabled 908 861 748 689 659 656 654 653 651
Overall (gLPF=0) µA
IDD
Current Filters Enabled
916 863 748 689 659 656 654 653 651
(gLPF=1)
Table 17. Current Consumption for 6DOF Attitude Engine Mode (without Magnetometer). VDD =
VDDIO = 1.8V
Mode Unit
ODR Setting 1 2 4 8 16 32 64 Hz
Filters Disabled
783 783 783 783 783 783 783
Typical Overall (aLPF=0; gLPF=0)
µA
IDD Current Filters Enabled
787 787 787 787 787 787 787
(aLPF=1; gLPF=1)
Table 18. Current Consumption for 9DOF Attitude Engine Mode (with Magnetometer). VDD =
VDDIO = 1.8V
Mode Unit
ODR 1 2 4 8 16 32 64 Hz
Typical With
Overall IDD Magnetometer at tbd tbd tbd tbd tbd tbd tbd µA
Current 31.25 Hz
AttitudeEngine Mode
Configuration Registers Unit Comments
Sensor Enable, SPI 3 or 4
CTRL1 Control power states, SPI communications
Wire
Enable the AttitudeEngine (CTRL7, sEN =1, aEN=1, gEN=1,
Enable AttitudeEngine CTRL7
optionally mEN=1 if external magnetometer is available)
Configure CTRL6 AttitudeEngine Output Data Rate and Motion on Demand
Configure Accelerometer,
CTRL2 Configure Full Scale; Enable Self Test
Enable Self Test
Configure Gyroscope,
CTRL3 Configure Full Scale; Enable Self Test
Enable Self Test
Configure Magnetometer CTRL4 Configure Output Data Rate and choose device
Sensor Filters CTRL5 Configure and Enable/Disable Low Pass Filters
Quaternion Increment dQ[W,X,Y,Z]_[H,L] Unit Quaternion format in sensor frame
Rotation compensated velocity increment (based on specific
Velocity Increment dV[X,Y,Z]_[H,L] ms-1
force), rotated to sensor frame of reference
gaus Rotation compensated magnetic field (rotated to sensor frame
Magnetic Field M[X,Y,Z]_[H,L]
s of reference)
STATUSINT
Status STATUS0, Data Availability, Wake on Motion detected
STATUS1
Magnetometer and Gyroscope bias update
Bias Update, Clipping, AE_CLIP,
acknowledgement, Sensor clipping acknowledgement,
Overflow AE_OVFLOW
Velocity increment overflow
Temperature TEMP_[H,L] °C Temperature of the sensor
Register Name
WHO_AM_I Register Address: 0 (0x00)
Bits Name Default Description
7:0 WHO_AM_I 0x05 Device identifier 0x05 - to identify the device is a QST sensor
7:0 REVISION_ID 0x79 Device Revision ID
Register Name
CTRL1 Serial Interface and Sensor Enable. Register Address: 2 (0x02)
Bits Name Default Description
0: Enables 4-wire SPI interface
7 SIM 1’b0
1: Enables 3-wire SPI interface
0: Serial interface (SPI or I2C) address do not auto increment.
6 SPI_AI 1’b0
1: Serial interface (SPI or I2C) address auto increment
0: SPI read data little endian
5 SPI_BE 1’b1
1: SPI read data big endian
4:1 Reserved 4’b0 Reserved
0: Enables internal 2 MHz oscillator
0 SensorDisable 1’b0
1: Disables internal 2 MHz oscillator
CTRL2 Accelerometer Settings: Address: 3 (0x03)
Bits Name Default Description
7 aST 1’b0 Enable Accelerometer Self Test.
Set Accelerometer Full-scale:
000 - Accelerometer Full-scale = ±2 g
001 - Accelerometer Full-scale = ±4 g
6:4 aFS<2:0> 3’b0
010 - Accelerometer Full-scale = ±8 g
011 – Accelerometer Full-scale = ±16 g
1xx – N/A
Set Accelerometer Output Data Rate (ODR):
Setting ODR Rate (Hz) Mode Duty Cycle
0000 8000 Normal 100%
0001 4000 Normal 100%
0010 2000 Normal 100%
0011 1000 Normal 100%
0100 500 Normal 100%
0101 250 Normal 100%
0110 125 Normal 100%
3:0 aODR<3:0>(13) 4’b0
0111 62.5 Normal 100%
1000 31.25 Normal 100%
1001 N/A
1010 N/A
1011 N/A
1100 128 Low Power 100%
1101 21 Low Power 58%
1110 11 Low Power 31%
1111 3 Low Power 8.5%
Register Name
CTRL3 Gyroscope Settings: Address 4 (0x04)
Bits Name Default Description
7 gST 1’b0 Enable Gyro Self-Test.
Set Gyroscope Full-scale:
000 - ±16 dps
001 - ±32 dps
010 - ±64 dps
6:4 gFS<2:0> 3’b0 011 - ±128 dps
100 - ±256 dps
101 - ±512 dps
110 - ±1024dps
111 - ±2048 dps
Set Gyroscope Output Data Rate (ODR):
Setting ODR Rate (Hz) Mode Duty Cycle
0000 8000 Normal 100%
0001 4000 Normal 100%
0010 2000 Normal 100%
0011 1000 Normal 100%
0100 500 Normal 100%
0101 250 Normal 100%
0110 125 Normal 100%
3:0 gODR<3:0> (13) 4’b0
0111 62.5 Normal 100%
1000 31.25 Normal 100%
1001 N/A
1010 N/A
1011 N/A
1100 N/A
1101 N/A
1110 N/A
1111 N/A
CTRL4 Magnetometer Settings: Address: 5 (0x05)
Bits Name Default Description
7 Reserved 1’b0
Designate External Magnetometer Device: (supported devices listed
6:3 mDEV<3:0> 4’b0
in Section 11).
Set Recommended Magnetometer Output Data Rate (ODR):
Register Name
CTRL5 Sensor Data Processing Settings. Register Address: 6 (0x06)
Bits Name Default Description
7 Reserved 1’b0
gLPF_MODE BW [Hz]
00 2.62% of ODR
6:5 gLPF_MODE 2’b0
01 3.59% of ODR
10 5.32% of ODR
11 14.0% of ODR
0: Disable Gyroscope Low-Pass Filter.
4 gLPF_EN 1’b0 1: Enable Gyroscope Low-Pass Filter with the mode given by
gLPF_MODE.
3 Reserved 1’b0
aLPF_MODE BW [Hz]
00 2.62% of ODR
2:1 aLPF_MODE 2’b0
01 3.59% of ODR
10 5.32% of ODR
11 14.0% of ODR
0: Disable Accelerometer Low-Pass Filter.
0 aLPF_EN 1’b0 1: Enable Accelerometer Low-Pass Filter with the mode given
by aLPF_MODE.
CTRL6 Attitude Engine ODR and Motion on Demand: Address: 7 (0x07)
Bits Name Default Description
0: Disables Motion on Demand.
7 sMoD 1’b0
1: Enables Motion on Demand (Requires sEN=1).
6:3 Reserved 4’b0
Attitude Engine Output Data Rate (ODR)
Setting ODR Rate (Hz)
000 1
001 2
010 4
2:0 sODR<2:0> 3’b0
011 8
100 16
101 32
110 64
Register Name
CTRL7 Enable Sensors and Configure Data Reads. Register Address: 8 (0x08)
Bits Name Default Description
0: Disable syncSmpl mode
7 syncSmpl 1’b0
1: Enable syncSmple mode
1: High Speed Internal Clock
6 sys_hs 1’b0
0: Clock based on ODR
5 Reserved 1’b0
0: Gyroscope in Full Mode (Drive and Sense are enabled).
4 gSN 1’b0 1: Gyroscope in Snooze Mode (only Drive enabled).
This bit is effective only when gEN is set to 1.
0: Disable AttitudeEngine orientation and velocity increment
computation
3 sEN 1’b0
1: Enable AttitudeEngine orientation and velocity increment
computation
0: Magnetometer placed in Standby or Power-down Mode.
2 mEN 1’b0
1: Enable Magnetometer
0: Gyroscope placed in Standby or Power-down Mode.
1 gEN 1’b0
1: Enable Gyroscope.
0: Accelerometer placed in Standby or Power-down Mode.
0 aEN 1’b0
1: Enable Accelerometer.
CTRL8 Reserved – Special Settings. Register Address: 9 (0x09)
Bits Name Default Description
7:0 Reserved 0x00 Not Used
Register Name
Host Commands. Register Address: 10 (0x0A), Referred to: CTRL 9 Functionality
CTRL9 (Executing Pre-defined Commands)
Register Name
FIFO_WTM_TH FIFO Watermark Register Address: 19 (0x13)
Bits Name Default Description
7:0 FIFO_WTM 8’h0 Number of ODRs needed to trigger watermark
FIFO_CTRL FIFO Control Register Address: 20 (0x14)
Bits Name Default Description
This bit is automatically set by using a CTRL9 command to request
the FIFO to read data out of FIFO via FIFO_DATA register. It must
7 FIFO_RD_MODE 1’b0
be cleared again after the data read is complete so that writing
data to the FIFO can resume.
6:4 Reserved 3’b0
FIFO_SIZE[1:0] FIFO Sample Size
00 16 samples
3:2 FIFO_SIZE 2’b0 01 32 samples
10 64 samples
11 128 samples
FIFO_MODE[1:0] FIFO Sample Size
00 Bypass (FIFO disable)
01 FIFO
10 Stream
1:0 FIFO_MODE 2’b0
11 Stream to FIFO. In stream to
FIFO mode, once
motion/gesture interrupt event
happens, content of FIFO will
be emptied, pointers reset
FIFO_SMPL_CNT FIFO Sample Count Register Address: 21 (0x15)
Bits Name Default Description
FIFO_SMPL_CNT_L
7:0 8’b0 8 LS bits of FIFO Sample Count (in bytes).
SB
FIFO_STATUS FIFO Status. Register Address 22 (0x16)
Bits Name Default Description
0 – FIFO is not Full
7 FIFO_FULL 1’b0
1 -- FIFO is Full
0 -- FIFO Water Mark Level not hit.
6 FIFO_WTM 1’b0
1 – FIFO Water Mark Level Hit
0 – FIFO Overflow has not happened
5 FIFO_OVFLOW 1’b0 1 -- FIFO Overflow condition has happened (attempt to save ODR
data to FIFO when it is full)
0 – FIFO is Empty
4 FIFO_NOT_EMPTY 1’b0
1 -- FIFO is not Empty
3:2 Reserved 2’b0
FIFO_SMPL_CNT_
1:0 2’b0 2 MS bits of FIFO Sample Count (in bytes).
MSB
Register Name
I2CM_STATUS I2C Master Status, Register Address: 44 (0x2C)
Bits Name Default Description
7:3 Reserved 5’b0
0: I2C Master data movement not complete (ARM still processing)
2 I2CM_done 1’b0
1: I2C Master data movement is complete (ARM has finished)
0: Magnetometer data is NOT Valid
1 Data_VLD 1’b0 1: Indicates Magnetometer X, Y, Z axes data is available and valid.
This signal is asserted at the next ODR pulse and de-asserted on
I2C read of the next cycle.
0: I2C Master transaction with peripheral is not done.
0 I2CM_active 1’b0
1: Indicate I2C Master transaction with peripheral is done.
STATUSINT Sensor Data Available and Lock Register Address: 45 (0x2D)
Bits Name Default Description
7:2 Reserved 5’b0
If syncSmpl = 1 (Bit 7 in CTRL7) then:
0: Sensor Data not locked.
1 Locked 1’b0 1: Sensor Data Locked.
If syncSmpl = 0 then bit 1 will have the same value of the Interrupt
in INT1.
If syncSmpl = 1 (Bit 7 in CTRL7) then:
0: Sensor Data not available
0 Avail 1’b0 1: Sensor Data available for reading
If syncSmpl = 0 then bit 0 will have the same value of the Interrupt
in INT2.
STATUS0 Output Data Status Register Address: 46 (0x2E)
Bits Name Default Description
Register Name
G[X,Y.Z]_[H,L] Angular Rate Output. Register Address: 59 – 64 (0x3B – 0x40)
Bits Name Default Description
7:0 GX_L<7:0> 0x00 X-axis angular rate in two’s complement.
7:0 GX_H<15:8> 0x00 GX_L – lower 8 bits. GX_H – upper 8 bits.
Register Name
M[X,Y,Z]_[H,L] Magnetometer Output. Register Address: 65 - 70. (0x41 – 0x46)
Bits Name Default Description
7:0 MX_L<7:0> 0x00 X-axis magnetic field data in two’s complement.
7:0 MX_H<15:8> 0x00 MX_L – lower 8 bits. MX_H – upper 8 bits.
Register Name
AE_REG2 AttitudeEngine Register 2, Address: 88 (0x58)
Bits Name Default Description
7:3 Reserved 5’b0
2 dvz_of 1’b0 Velocity Increment overflow along dvz.
1 dvy_of 1’b0 Velocity Increment overflow along dvy.
Comments on
Mode/Outputs dQ dV M TIMESTAMP
TIMESTAMP
AttitudeEngine in ODR Mode (Accelerometer and Gyroscope Enabled)
CTRL6 Register sMoD=0
24-bit data.
gSN=0 Count starts at 1,
sEN=1 Quaternion Velocity AttitudeEngine 16,777,216
No Data
Increment Increment Sample Count count wraps to 0,
CTRL7 Register aEN=1 i.e.
gEN=1 Mod(16,777,216)
mEN=0
AttitudeEngine in Motion on Demand (MoD) mode (Accelerometer and Gyroscope enabled)
CTRL6 Register sMoD=1
24-bit data.
gSN=0 Gyroscope Count starts at 1,
sEN=1 Quaternion Velocity Samples in 16,777,216
No Data
Increment Increment Integration count wraps to 0,
CTRL7 Register aEN=1 Window i.e.
gEN=1 Mod(16,777,216)
mEN=0
AttitudeEngine with Raw Magnetometer in ODR Mode (Accelerometer, Gyroscope and
Magnetometer Enabled)
CTRL9
Protocol
CMND Name Command Description
Type
Value
CTRL_CMD_NOP 0x00 Ctrl9 No operation
Copies bias_gx,y,z from CAL registers to
CTRL_CMD_GYRO_BIAS 0x01 WCtrl9
FIFO and set GYROBIAS_PEND bit
SDI MOD (Motion on Demand), request
CTRL_CMD_REQ_SDI 0x03 Ctrl9R
to read SDI data
CTRL_CMD_RST_FIFO 0x04 Ctrl9 Reset FIFO from Host
CTRL_CMD_REQ_FIFO 0x05 Ctrl9R Get FIFO data from Device
Program device on I2C Master Bus
CTRL_CMD_I2CM_WRITE 0x06 WCtrl9 (I2CM) by writing to CAL1_[H,L],
CAL2_[H,L], and CAL3_L registers.
Set up and enable Wake on Motion
CTRL_CMD_WRITE_WOM_SETTING 0x08 WCtrl9
(WoM)
CTRL_CMD_ACCEL_HOST_DELTA_
0x09 WCtrl9 Change accelerometer offset
OFFSET
CTRL_CMD_GYRO_HOST_DELTA_
0x0A WCtrl9 Change gyroscope offset
OFFSET
Read USID_Bytes and FW_Version
CTRL_CMD_COPY_USID 0x10 Ctrl9R
bytes
CTRL_CMD_SET_RPU 0x11 WCtrl9 Configures IO pull-ups
This CTRL9 command of writing 0x05 to the Ctrl9 register Gyro_Delta_X : {CAL1_H, CAL1_L}
0x0a allows the host to instruct the device to reset the Gyro_Delta_Y : {CAL2_H, CAL2_L}
FIFO. Gyro_Delta_Z : {CAL3_H, CAL3_L}
Next, the Command is issued by writing 0x0A to CTRL9
CTRL_CMD_REQ_FIFO register 0x0A. Note, this offset change is lost when the
sensor is power cycled or the system is reset.
This CTRL9 Command is issued when the host wants to
get data from the FIFO. When the FIFO is enabled it will
be indicated to the host by asserting INT2 and thus CTRL_CMD_COPY_USID
signaling that a flag condition (like FIFO full) has been This CTRL9 Command copies the following data into UI
reached and that data is available to be read by the host. registers. It is initiated by the host writing 0x10 to CTRL9.
This Command is issued by writing 0x0D to the CTRL9 After issuing the command, the data will be available for
register 0x0A. The device will raise INT1 to indicate that the host to read from the registers shown below:
it is ready for a FIFO transaction. The host must read the
STATUS1 register bit 0 (CmdDone). At this point the host FW_Version byte 0 dQW_L
should set the FIFO_rd_mode Bit to 1 (FIFO_CTRL FW_Version byte 1 dQW_H
register 0x13 bit 7). The device will direct the FIFO data FW_Version byte 2 dQX_L
to the FIFO_DATA register 0x14 until the FIFO is empty.
The host must now set FIFO_rd_mode to 0, which will USID_Byte_0 dVX_L
cause the INT2 to be de-asserted. USID_Byte_1 dVX_H
USID_Byte_2 dVY_L
CTRL_CMD_I2CM_WRITE USID_Byte_3 dVY_H
This CTRL9 command of writing 0x06 to the Ctrl9 register USID_Byte_4 dVZ_L
0x0a allows the host to instruct the device to Program USID_Byte_5 dVZ_H
I2CM by writing to CAL1_[H,L], CAL2_[H,L], and CAL3_L
registers. CAL3_L is address offset, CAL2_[H,L] is
register data[31:16], CAL1_[H,L] is register data[15:0].
This Command is used to configure the I2C master, and
to execute an I2C write or read command.
6.1 Overview
The QMI8658C has two Interrupt lines, INT1 and INT2. With syncSmpl = 1 (refer to Table 24, CTRL7 register bit
INT1 is used as a general-purpose interrupt. The details 7), INT2 is placed into level mode: The INT2 is asserted
are described in the specific sections where INT1 and when data is available and remains asserted until the
INT2 are used. The following provides a summary of the host reads STATUS0 register.
INT1 and INT2 usage. If syncSmpl = 0, then bit 1 of The device continues to refresh the output data until the
STATUSINT register will have the same value as INT1 STATUS0 register is read by host.
and bit 0 of STATUSINT register will have the same value
as INT2. Once the STATUS0 is read by host the QMI8658C will
deassert INT2 and stop refreshing the output data. Once
the host detects INT2 has been deasserted it can start
Interrupt 1 (INT1) reading the output data.
The following summarizes the use of INT1:
Once the last byte of data has been read by the host (the
Set high for ~4 ms after reset to indicate that the chip is QMI8658C keeps track) the QMI8658C will start updating
ready for normal operation. the output register and set up the next INT2 when data is
If any operation has set INT1 it will always be cleared by available in the output registers.
reading STATUS1 register. FIFO Enabled Mode (see Section 8)
Used as part of the CTRL9 handshake protocol (see When the FIFO is enabled in the FIFO mode (the mode
section 5.8). bits in FIFO_CTRL register set to 01), INT2 is asserted
When Wake on Motion (WoM) is enabled, INT1 can be when the FIFO is full or when the watermark is reached.
selected to indicate WoM (see section 9). When the FIFO is enabled in the Streaming Mode (the
mode bits in FIFO_CTRL register set to 10), INT2 is
Interrupt 2 (INT2) asserted when the watermark is reached but not when
the FIFO is full because in the stream mode the FIFO will
INT2 generally indicates data availability.
continue to fill by overwriting the oldest data in the FIFO.
When Wake on Motion (WoM) is enabled, INT2 can be
INT2 is cleared in both the FIFO Mode and the Streaming
selected to indicate WoM (see section 9).
Mode by clearing the FIFO_rd_mode bit in the
The following indicates when INT2 will be asserted. FIFO_CTRL register. This is done as part of the CTRL9
command CTRL_CMD_REQ_FIFO.
Register-Read Mode (FIFO Bypass Mode)
Accelerometer and Gyroscope Self Test Modes (see
In Register-Read mode the accelerometer, gyroscope Section 10)
and magnetometer data are available in the Sensor Data
Output registers (A[X,Y,Z]_[H,L]). The updating of these INT2 is asserted to indicate availability of self-test data
output registers and the functionality of the INT2 interrupt and is cleared by resetting the aST and gST bits in
is controlled by the syncSmpl bit as described below. CTRL2 and CTRL3 registers, respectively.
With syncSmpl = 0 (refer to Table 24, CTRL7 register bit AE Mode
7), INT2 is placed into edge trigger mode: the Sensor
In AE Mode, INT2 is asserted when data is available.
Data Output Registers are updated at the Output Data
Rate (ODR), and INT2 is pulsed at the ODR. A rising
edge on INT2 indicates that data is available and INT2 is
cleared automatically after a short duration. It is the
responsibility of the host to detect the rising edge and to
latch the data before the next sample occurs. Note that
the INT2 pulse width is dependent on the ODR and the
sensor. It is not recommended to depend on the level to
determine if INT2 has occurred.
Bypass Mode
In Bypass mode (set in FIFO_CTRL), the FIFO is not
FIFO
(1536 Bytes) operational and, therefore, remains empty. Sampled data
from the gyroscope and/or Accelerometer are stored
directly in the Sensor Data Output Registers. When new
data is available, the old data is over-written.
FIFO Read Control
FIFO Mode
Logic
Host (SPI, I2C, or I3C) In FIFO mode, data from the sensors are stored in the
FIFO. The watermark interrupt, if enabled in FIFO_CTRL,
Figure 9. FIFO Data Flow is triggered when the FIFO is filled to the level specified
The FIFO size is configured using the FIFO_CTRL by the value of wtm<1:0> in the FIFO_CTRL register. The
register. When the FIFO is enabled for two or more FIFO continues filling until it is full. When full, the FIFO
sensors, as is true for all modes that have multiple sensors stops collecting data from the input channels. Data
active, the sensors must be set at the same Output Data collection restarts when FIFO is emptied.
Rate (ODR).
Streaming Mode
The FIFO is read through the I3C/I2C/SPI interface by In Streaming mode (set in FIFO_CTRL), data from the
reading the FIFO_DATA register. Any time the Output gyroscope and accelerometer are stored in the FIFO. A
Registers are read, data is erased from the FIFO watermark interrupt can be enabled and set as in FIFO
memory. mode. The FIFO continues filling until full. In this mode,
The FIFO has multiple operating modes: Bypass, FIFO, the FIFO acts as a circular buffer, when full, the FIFO
and Streaming. The operating modes are set using the discards the older data as the new data arrives.
mode<1:0> bits in the FIFO_CTRL register. Programmable watermark level events can be enabled to
generate dedicated interrupts on the DRDY/INT2 pin
Enabling FIFO (configured through the FIFO_CTRL register).
The FIFO is configured by writing to the FIFO_CTRL
register and is enabled after the accelerometer and/or
gyroscope are enabled. If the watermark function is
enabled in the FIFO_CTRL register, pin INT2 is asserted
when the FIFO watermark level is reached.
Register Name
FIFO_WTM_TH FIFO Watermark Threshold. Register Address: 19 (0x13)
Bits Name Default Description
7:0 FIFO_wtm_th 1’b0 Set watermark level, in ODRs.
FIFO_CTRL Configure FIFO. Register Address: 20 (0x14)
Bits Name Default Description
0: Disable FIFO read via FIFO_DATA register.
7 FIFO_rd_mode 1’b0 1: FIFO read via FIFO_DATA register is enabled. This bit is automatically
set by the CTRL9 command to request the FIFO.
6:4 Reserved 3’b0 Reserved
Set FIFO size. (See Error! Reference source not found. for more
details.)
00 – Set FIFO size at 16 samples for each enabled sensor
3:2 size<1:0> 2’b0 01 – Set FIFO size at 32 samples for each enabled sensor
10 – Set FIFO size at 64 samples for each enabled sensor
11 – Set FIFO size at 128 samples for each enabled sensor (up to 2
sensors enabled only)
Set FIFO Mode.
00 – Bypass (FIFO disable).
1:0 mode<1:0> 1’b0 01 – FIFO.
10 – Streaming.
11 – Not Used
FIFO_SMPL_CNT FIFO Sample Count. Register Address: 21 (0x15)
Bits Name Default Description
7:0 fifo_smpl_cnt_lsb 8’h00 The LS 8 bits of FIFO sample count, in bytes.
FIFO_STATUS FIFO Status. Register Address: 22 (0x16)
Bits Name Default Description
7 fifo_full 1’b0 FIFO size has been reached and is full.
6 wtm 1’b0 Watermark level hit.
FIFO over-flow condition has occurred. An attempt was made to save
5 overflow 1’b0
new data to the FIFO while it was full.
4 not_empty 1’b0 FIFO not empty.
3:2 reserved 2’b0
7:0 data<7:0> 8’b0 Read this register to read sensor data out of FIFO.
11 Magnetometer Setup
11.1 Magnetometer Description
The QMI8658C provides an I2C master interface (I2CM)
to connect with an external magnetometer. Currently the
QMI8658C can support the following magnetometers:
AK09915C, AK09918CZ, and QMC6308. To simplify
data acquisition between the magnetometer and the IMU,
the QMI8658C can time align the magnetometer samples
with the gyroscope and accelerometer samples.
SPI Features
SPC SPC
SPC SPC
SDI SDI SPI Slave 1 SPI Slave 1
SPI Master SDIO SDIO
SDO SDO (QMI8658) SPI Master (QMI8658)
(Host CS1 CS
Processor) CS1 CS (Host
Processor) CS2
CS2
SPC
CSn SPC
CSn SDI
SPI Slave 2
SDIO SPI Slave 2
SDO
CS
CS
SPC
SPC
SDI
SPI Slave n SDIO SPI Slave n
SDO
CS
CS
Figure 13. Typical SPI 4-Wire Multi-Slave Figure 14. Typical SPI 3-Wire Multi-Slave
SPI : Mode 0
SPI : Mode 3
Figure 15. SPI 4-Wire Single Byte Read and Write (Mode 0 and Mode 3)
SPI : Mode 3
SPI : Mode 3
Figure 17. SPI 3-Wire Single Byte Read and Write Transactions
SPI : Mode 3
SPI : Mode 3
Note:
15. Figure from JEDEC J-STD-020
0.5 July 7, 2020 Updated CAL Register Addresses, CTRL9 Commands and Descriptions,
Current Consumption, Accelerometer and Gyroscope Filter Characteristics,
Low Power Mode ODR, Wake on Motion, Magnetometer Sensors supported
0.6 Jan 13, 2021 Updated SPI description and diagrams, SPI modes, product performance
specifications, and register map and descriptions
Attitude Engine™, Gen 2 AttitudeEngine™, and XKF3™ are trademarks of Fairchild Semiconductor licensed by ON
Semiconductor to QST Corporation.