| Electronic Components Datasheet Search |
|
AN4650 Datasheet(PDF) 88 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4650 Datasheet(HTML) 88 Page - STMicroelectronics |
|
88 / 102 page ![]() First-in first-out (FIFO) buffer AN4650 88/102 DocID027415 Rev 1 Using the FIFO decimation factors, data can be stored in FIFO at a rate lower than the rate of the FIFO trigger signal. Four decimation factors can be configured, one for each FIFO data set: the DEC_FIFO_G[2:0] bits of the FIFO_CTRL3 register define if the gyroscope data (associated to the 1st FIFO data set) are stored in FIFO and the relative rate; the DEC_FIFO_XL[2:0] bits of the FIFO_CTRL3 register define if the accelerometer data (associated to the 2nd FIFO data set) are stored in FIFO and the relative rate; the DEC_DS3_G[2:0] bits of the FIFO_CTRL4 register define if the data associated to the 3rd FIFO data set are stored in FIFO and the relative rate; the DEC_DS4_G[2:0] bits of the FIFO_CTRL4 register define if the data associated to the 4th FIFO data set are stored in FIFO and the relative rate. Note: It’s required to set at least one of the four decimation factors to 1 (no decimation). When using the internal trigger (accelerometer/gyroscope data-ready), the recommended procedure to configure the FIFO trigger is the following: 1. Set the ODR_FIFO bits of the FIFO_CTRL5 register to the value corresponding to the maximum ODR between the gyroscope and accelerometer; 2. Set to 1 the decimation factor of the FIFO data set associated to the sensor having the maximum ODR. 8.4 Retrieving data from the FIFO Note: When data are stored in the FIFO, the configuration must not be changed in order to be able to retrieve data correctly. When FIFO is enabled and the mode is different from Bypass, reading the FIFO output registers (FIFO_DATA_OUT_L and FIFO_DATA_OUT_H) returns the oldest FIFO sample set. Whenever these registers are read, their content is moved to the SPI/I2C output buffer. FIFO slots are ideally shifted up one level in order to release room for a new sample, and the FIFO output registers load the current oldest value stored in the FIFO buffer. The recommended way to retrieve data from the FIFO is the following: 1. Read the FIFO_STATUS1 and FIFO_STATUS2 registers to check how many words (16-bit data) are stored in the FIFO. This information is contained in the DIFF_FIFO_[11:0] bits. 2. Read the FIFO_STATUS3 and FIFO_STATUS4 registers. The FIFO_PATTERN_[9:0] bits allows understanding which sensor and which couple of bytes is being read (see Section 8.5 for more details). 3. Read the FIFO_DATA_OUT_L and FIFO_DATA_OUT_H registers to retrieve the oldest sample (16-bits format) in the FIFO. They are respectively the lower and the upper part of the oldest sample. Note: In case of SPI interface usage, reading of the FIFO_STATUS registers (points 1 and 2 above) must be synchronized either on the data-ready interrupt or on watermark interrupt signal; the interrupt signal has to be driven on an interrupt pin. The entire FIFO content is retrieved by performing a certain number of read operations from the FIFO output registers until the buffer becomes empty (FIFO_EMPTY bit of FIFO_STATUS2 register is set high). Every other read operation returns the same value (the latest sample). |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |