3. FIFO的几种运行模式
(1) Bypass mode
Bypass mode is also used to reset the FIFO when in FIFO mode.
(2) FIFO mode
In FIFO mode data from the output channels are stored in the FIFO un
til it is full.
(3) Continuous mode
Continuous mode provides a continuous FIFO update: as new data arrives, the older data is discarded.
(4) Continuous-to-FIFO mode
In Continuous-to-FIFO mode, FIFO behavior changes according to the trigger event detected in one of the following interrupt registers FUNC_SRC (53h), TAP_SRC (1Ch), WAKE_UP_SRC (1Bh) and D6D_SRC
(1Dh).
When the selected trigger bit is equal to '1', FIFO operates in FIFO mode.
When the selected trigger bit is equal to '0', FIFO operates in Continuous mode.
(5) Bypass-to-Continuous mode
In Bypass-to-Continuous, data measurement storage inside FIFO operates in Continuous mode when selected triggers in one of the following interrupt registers FUNC_SRC (53h), TAP_SRC (1Ch),WAKE_UP_SRC (1Bh) and D6D_SRC (1Dh) are equal to '1', otherwise FIFO content is reset (Bypass mode).
4.读取FIFO数据
(1)有关的寄存器:
(2)数据存储的方式:
Saving data in the FIFO buffer is organized in four FIFO data sets consisting of 6 bytes each:
The 1st FIFO data set is reserved for gyroscope data;
The 2nd FIFO data set is reserved for accelerometer data;
The 3rd FIFO data set is reserved for the external sensor data stored in the registers from
SENSORHUB1_REG (2Eh) to SENSORHUB6_REG (33h);
The 4th FIFO data set can be alternately associated to the external sensor data stored in the
registers from SENSORHUB7_REG (34h) to SENSORHUB12_REG(39h), to the step
counter and time stamp info, or to the temperature sensor data.
七、小钢炮CANNAN中关于LSM6DS3的函数
1.初始化:lsm6ds3_6_axis_init();
2.获取数据:read_6_Axis_data(void* args);
还有其他的一些函数,大家可以参考http://www.juma.io/doc/zh/embedded_api/imu_sensor/