04-21-2021 08:37 AM
Hi,
I need to read FIFO for my application. I don't know what frequently FIFO collecting data. I want to see all movements in every seconds. I want it to collect 240 bytes every seconds and every 4 seconds I will read FIFO by 960 bytes and so on. Is it possible ?
Solved! Go to Solution.
04-21-2021 05:40 PM
Hi,
Thanks for your nquiry.
BMA400 FIFO has 8-bit mode and 12-bit mode. If you choose 8-bit mode for 3 axes, then each frame in FIFO will have 4 bytes. If you choose 12-bit mode for 3 axes, then each frame in FIFO will have 7 bytes.
BMA400 has options of output data rate (ODR) of 50Hz, 100Hz, 200Hz, etc. At 50Hz ODR for example, each second FIFO will have 200 bytes in 8-bit mode and 350 bytes in 12-bit mode. So it is not possible to have 240 bytes in FIFO each second.
Thanks.
04-22-2021 03:51 PM
Thank you for answer.
Actually I would like to know that how long does the fifo fill. Let's say if ODR is 50 Hz and BMA400 was set to 8-bit mode , having full fifo takes ??? milliseconds.
04-22-2021 06:41 PM
Hi,
BMA400 FIFO size is as shown below for both 8-bit and 12-bit modes. If you choose 8-bit mode for x/y/z three axes at 50Hz ODR, then when FIFO data samples reach 1016 bytes, FIFO full interrupt will be generated if you have enabled FIFO full interrupt. This corresponds to 254 frames where each frame takes 20ms at 50Hz ODR. So it will take 254 * 20ms = 5080ms = 5.08s for the FIFO to be full.
Mode |
8 bit mode |
12 bit mode |
||||
Enabled axis |
Single (X, Y or Z) |
Any Two (XY, YZ or XZ) |
All Three (XYZ) |
Single (X, Y or Z) |
Any Two (XY, YZ or XZ) |
All Three (XYZ) |
Frame Size |
2 Bytes |
3 Bytes |
4 Bytes |
3 Bytes |
5 Bytes |
7 Bytes |
FIFO Byte Count when full interrupt generated |
1016 Bytes (508 Frames) |
1017 Bytes (339 Frames) |
1016 Bytes (254 Frames) |
1017 Bytes (339 Frames) |
1020 Bytes (204 Frames) |
1022 Bytes (146 Frames) |
Thanks.
05-04-2021 10:54 AM
Thank you so much !! That is what I want to know.