03-04-2020 12:29 AM
First let me start by saying in my application I'm not using the API and have implemented my own driver. Everything is working properly when not using the FIFO. However we want to utilize the 6.4KHz ODR and this requires using the FIFO and prefiltered data. The problem I'm seeing is that when we choose filtered data for the FIFO (FIFO_DOWNS = 0x88) the data is correct and the GYRO_RANGE of +=2000dps (GYRO_RANGE = 0x00) works as expected (and matches the behavior when doing direct register reads instead of using the FIFO).
However when switching to prefiltered data (FIFO_DOWNS = 0x00) to get the 6.4KHz ODR the GYRO_RANGE seems to be ignored and the data behaves as if the range is +-250dps (as if GYRO_RANGE was set to 0x03) even though it's set to 0x00 (and verified by reading the register back). So instead of 16.4 LSB/dps it's behaving like 131.2 LSB/dps. This is unworkable in our application as we need the full +-2000dps scale.
Everything else behaves as expected. The ODR in the FIFO is 3.2KHz when using filtered and 6.4KHz when prefilitered as it should. It's just the GYRO_RANGE and the full-range scaling that seems to be misbehaving.
In this test case the FIFO was configured for headerless mode and only the gyro data was enabled (FIFO_CONFIG_1 = 0x80).
So to recap, the gyro data in the FIFO behaves normally if it's configured to be filtered data. However when set to be prefiltered data the scaling is incorrect and seems to be behaving like GYRO_RANGE = 0x03 (+-250dps) even though it's set to 0x00 (+-2000dps).
Any thoughts?
Solved! Go to Solution.
03-19-2020 09:29 PM
Hi etracer,
I am also implementing my own API, with regards to FIFO, if only gyro is used, (and this is not clear to me) what should be read offset in the FIFO.
If AUX is enabled, then gyro offset is 8 (as in datasheet) . Sorry not starting a new thread on the FIFO here.
03-20-2020 02:05 PM
@pr1 wrote:Hi etracer,
I am also implementing my own API, with regards to FIFO, if only gyro is used, (and this is not clear to me) what should be read offset in the FIFO.
If AUX is enabled, then gyro offset is 8 (as in datasheet) . Sorry not starting a new thread on the FIFO here.
If you're using headerless mode and only have gyro data in the FIFO (FIFO_CONFIG_1 = 0x80) then there is no offset. Just the 6 byte frames of the gyro axis data.
03-22-2020 02:26 AM - edited 03-22-2020 02:28 AM
Thank you, yes that is correct. I have only gyro data and bytes 0-5 have the first x,y,z of the gyro data.
I have another question though.
The FIFO is set in overwrite mode, and everytime I check the length it is 230.
What is 230 ? Is it the number of frames ?
IS this the number of frames then 230x6=1380 bytes. The FIFO is supposed to be 2 KB.
Is the FIFO lenght correct and 230 is the number of frames (on frame is one x,y,z tuple - 6 bytes) ?
This is the fifo len method
03-22-2020 03:34 PM
The FIFO length is the number of bytes available in the FIFO - not the number of "frames". So in the discussed example of only headerless gyro data in the FIFO one "frame" would be the FIFO length reporting 6 bytes.
03-23-2020 04:05 PM
Thank you for the clarification. I also found the issue with the fifo length code posted above the following was incorrect