| Electronic Components Datasheet Search |
|
AN3393 Datasheet(PDF) 100 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3393 Datasheet(HTML) 100 Page - STMicroelectronics |
|
100 / 103 page ![]() First-in first-out (FIFO) buffer AN3393 100/103 DocID018750 Rev 4 1. If no watermark is used, #FSS+1 samples have to be read every time the overrun interrupt occurs. 2. If the watermark functionality is used and the WTM_EN bit is equal to “1”, the FIFO size is limited to the watermark level. Overrun and watermark interrupts have the same behavior in this case. #FSS+1 samples have to be read every time the overrun or the watermark interrupt occurs. 3. If the watermark functionality is used and the WTM_EN bit is equal to “0”, the watermark interrupt will raise one ODR after the watermark level is reached. If #FSS samples are read every time the overrun interrupt occours, the last sample stored will be left in the FIFO for the next read. If #FSS+1 samples are read every time the watermark interrupt occurs, the first read sample has to be discarded to avoid multiple reads (it was already read in the previous read cycle). Whenever the output 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 new sample reception and output registers load the current oldest value stored in the FIFO buffer. All the FIFO sample sets (6 bytes) must be read in a period of time lower than 1/ODR (as shown in Figure 37). If the reading period is higher than 1/ODR, some data can get lost because data recovery is not fast enough to free slots for new acceleration data. In this case, the number of samples correctly retrieved is related to the difference between the current ODR and the FIFO sample set reading rate. In Figure 37 “Rx” indicates a 6-byte read operation and “F0*” represents a single ODR slot (expanded in the figure). After the entire FIFO content is retrieved, every other read operation returns the same last value until a new sample set is available in the FIFO buffer. The 32 FIFO samples can be retrieved from the FIFO using every read byte combination in order to increase application flexibility (ex: 196 single-byte read, 32 reads of 6 bytes, 1 multiple read of 196 bytes, etc.). To perform correct data reading, the bit IF_ADD_INC in the CTRL_REG6 register must be set to “1”. It is recommended to read all FIFO slots in a multiple byte read of 196 bytes (6 output registers by 32 slots) faster than 1*ODR. In order to minimize communication between the master and slave, the read address is automatically updated by the device (ADD_INC = 1). The address rolls back to 28h when register 2Dh is reached. In order to avoid losing data, the right ODR must be selected according to the serial communication rate available. In the case of standard I2C mode being used (max. rate 100 kHz), a single sample set reading takes 830 μs while total FIFO download is about 17.57 ms. I2C speed is lower than SPI and it needs about 29 clock pulses to start communication (start, slave address, device address+write, restart, device address+read) plus an additional 9 clock pulses for every byte to read. If this suggestion were followed, the complete FIFO read would be performed faster than 1*ODR, which means that using a standard I2C, the selectable ODR must be lower than 57 Hz. If a fast I2C mode is used (max. rate 400 kHz), the selectable ODR must be lower than 228 Hz. |
|
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 |