Error FIFO FXLS8471

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error FIFO FXLS8471

5,284 Views
carloscanal
Contributor II

I'm working with a FXLS8471 sensor with SPI.
My problem is that the reading of the 32  measurements of the FIFO  does not coincide with the reading of the acceleration in the three axes. The sensor interrupted by filling the FIFO but when I try to read the 192 bytes in burst mode, the answer is incomprehensible.
Thank you

 

Carlos Canal

Labels (1)
5 Replies

4,612 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello Carlos,

Can you share your FXLS8471 configuration?
I also would like to take a look at your drain function which empty the FIFO.

Here my configuration if you want to compare:

// CONFIG

#define FXLS8471Q_CTRL_REG1        0x2A

#define FXLS8471Q_CTRL_REG2        0x2B

#define FXLS8471Q_CTRL_REG3        0x2C

#define FXLS8471Q_CTRL_REG4        0x2D

#define FXLS8471Q_CTRL_REG5        0x2E

#define FXLS8471Q_XYZ_DATA_CFG     0x0E

// ID

#define FXLS8471Q_WHO_AM_I         0x0D

#define FXLS8471Q_WHO_AM_I_VAL     0x6A

// FIFO

#define FXLS8471Q_F_SETUP          0x09

#define FXLS8471Q_F_STATUS         0x00

bool FXLS8471Q::vInit()

{

    bool __b_result=false;

    uint8_t __u8_temp=0xFF;

    /* Check presence of the sensor to prevent SPI issues*/

    if(bRead(FXLS8471Q_WHO_AM_I,&__u8_temp,1))  

    if(__u8_temp == FXLS8471Q_WHO_AM_I_VAL)      //Check Sensor ID answer

  

    /* Confugre the sensor */

    if(bWrite(FXLS8471Q_CTRL_REG1  ,0x0))        //Standby mode

    if(bWrite(FXLS8471Q_XYZ_DATA_CFG,0x2))        //0.976mg/LSB  

  

    /* Configure the FIFO */

    if(bWrite(FXLS8471Q_F_SETUP    ,0x80))      // FIFO mode2 : stops accepting new samples when overflowed

  

    /* Configure the FIFO interrupt */

    if(bWrite(FXLS8471Q_CTRL_REG3  ,0x82))      // FIFO, interrupt active high (rising event)

    if(bWrite(FXLS8471Q_CTRL_REG4  ,0x40))      // FIFO interrupt enabled

    if(bWrite(FXLS8471Q_CTRL_REG5  ,0x40))      // FIFO interrupt pin routed to INT1

    if(bWrite(FXLS8471Q_CTRL_REG1  ,0x11))      //Set ODR to 400Hz & active mode

    {

        __b_result= true;

    }

                                      

    return __b_result;

}

#define FXLS8471Q_OUT_X_MSB         0x01

bool FXLS8471Q::bGetFIFOAccelData(int16_t __aai16_AccelData[32][3])

{

    uint8_t __au8_Buffer[192];

    int16_t __i16_SingleData;

    uint8_t __u8_i,__u8_j;

    bool __b_result;

    if(__b_result = bRead(FXLS8471Q_OUT_X_MSB,(uint8_t*)__au8_Buffer,192))

    {

        for(__u8_i=0;__u8_i<32;__u8_i++)

        {

            for(__u8_j=0;__u8_j<3;__u8_j++)

             {

            __i16_SingleData = (int16_t)( (__au8_Buffer[__u8_j*2+__u8_i*6]<<8) + __au8_Buffer[__u8_j*2+__u8_i*6+1]);

             __aai16_AccelData[__u8_i][__u8_j] =  (int16_t)( ((float)__i16_SingleData)/4.0);

            }  

        }

     

    }

    return __b_result;

}

Give me more information about your issues.

Thanks,

Anthony

4,612 Views
carloscanal
Contributor II

Hello Anthony:
Thank you very much for your cooperation.
This weekend I report my code and put it on this page.
I have the following question: Can use a 800 Hz ODR to work with FIFO?
Thank you very much and best regards

Carlos Canal

0 Kudos

4,610 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello Carlos,

Yes, the FIFO works with a 800Hz data rate. You just have to configure the CTRL_REG1 register by resetting the dr[0:2] field (to 0b000) .

I attached an application note about FIFO uses in the motion sensors if you want to take a look at.

Have a good day.

Anthony

0 Kudos

4,610 Views
carloscanal
Contributor II

Hello Anthony:

I do not get properly read accelerations 32 records stored in the FIFO.

For example, a reading of the acceleration of the three axes is:   FF  E0 FD  70  40  E8

Where axis X reading is = FF E0 (AX=0.0024g), axis Y=FD 70 (Ay=-0.0518g) and axis Z= 40 E8 (Az=0.9995g)

The following data correspond to a reading of the FIFO

For example, axis X =7E  D8 , axis Y =20 60  and axis Z =00 40
7E  D8 20  60  00  40         7E  B8  20  38 00  34          7E D8  20  B8 00  30      7E D8  20  4C 00  18      7E E8  20  90 00  34         7E  F8 20  64  00 18

7E F4  20  40 00  3C          7E  F4  20  30 00  10          7E  D8  20  78  00 3C     7E C0  20  50 7F  F8      7E D0  20  40 00  44         7E  B0 20  6C  00 44

7E  E0 20  50  00 38          7E F0  20  7C 00  08           7E  E0  20  38 00  00      7E  D8 20  50  00  18      7E C0  20  5C 00  10        7E  E0 20  74  00 18

  7E E0  20  7C 00  10         7E  D8 20  90  00 10            7E  F0 20  30  00 30       7E E0  20  30  00  38      7E E8  20  60 00  44        7E  E8 20 58  00  2C

  7E  E0 20  54  00 3C         7E F4  20  88 00  58            7E D8  20  60 00  2C      7E  B8 20  6C  00 38      7E  A8 20  64  00 20         7E A8  20  64 00  44

   7E D0  20  60 00  04         7E  E0 20  58  00 7C 

La function para leer los 192 bytes es la siguiente:

void IMUREAD2(char reg1, int count, unsigned char array[]){

unsigned int i;

unsigned char value;

unsigned  char dire, dire1;

dire =reg1 &0x7F;

dire1= reg1 &0x80;

CS_FX=0;

WByteSPI1(dire);

WByteSPI1(dire1);

                for(i = 0; i < count; i++){

                               array[i]=RByteSPI1();//

                               }

Nop();

CS_FX=1;

return;

                }

Thank you very much and best regards

Carlos Canal

0 Kudos

4,610 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello Carlos,

Here some suggestions & feedbacks:

"Where axis X reading is = FF E0 (AX=0.0024g), axis Y=FD 70 (Ay=-0.0518g) and axis Z= 40 E8 (Az=0.9995g)"

Regarding your conversion, AX should be negative FFE0 (hex) = -32 signed 16 bits) = -32/2² = -4 (signed 14bits)  = -4*sensitivity (g or mg).

About your reading function, it seems good, I've got:

bool FXLS8471Q::bRead(uint8_t __u8_register, uint8_t* __au8_OutValue,uint8_t __u8_length)

{

    bool __b_result = false;

    uint8_t __u8_i;

   

    _t_cs = 0;

   

    _t_spi.write(  (__u8_register&0x7F) | (0x0<<7) ) ;

    _t_spi.write(__u8_register&0x80);

    for(__u8_i=0;__u8_i<__u8_length;__u8_i++)

    {

        __au8_OutValue[__u8_i] =  _t_spi.write(0x00) ;

    }

    _t_cs   =   1;

  

    __b_result = true;

    return __b_result;

}

but again, check your conversion...

Are you sure the FIFO is enabled? How did you configure the sensor?

Thanks,

Anthony

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-468682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EError%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20lang%3D%22EN%22%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3EI'm%20working%20with%20a%20FXLS8471%20sensor%20with%20SPI.%3CBR%20%2F%3E%20My%20problem%20is%20that%20the%20reading%20of%20the%2032%26nbsp%3B%20measurements%20of%20the%20FIFO%26nbsp%3B%20does%20not%20coincide%20with%20the%20reading%20of%20the%20acceleration%20in%20the%20three%20axes.%20The%20sensor%20interrupted%20by%20filling%20the%20FIFO%20but%20when%20I%20try%20to%20read%20the%20192%20bytes%20in%20burst%20mode%2C%20the%20answer%20is%20incomprehensible.%3CBR%20%2F%3E%20Thank%20you%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECarlos%20Canal%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-468682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EIntelligent%20Sensing%20Framework%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-468687%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Error%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468687%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Carlos%2C%3C%2FP%3E%3CP%3EHere%20some%20suggestions%20%26amp%3B%20feedbacks%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%20class%3D%22hps%22%20style%3D%22font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%20color%3A%20%2351626f%3B%22%3E%22Where%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22hps%22%20style%3D%22font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%20color%3A%20%2351626f%3B%22%3Eaxis%20X%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22hps%22%20style%3D%22font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%20color%3A%20%2351626f%3B%22%3Ereading%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22hps%22%20style%3D%22font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%20color%3A%20%2351626f%3B%22%3Eis%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3E%20%3D%20FF%20E0%20(AX%3D0.0024g)%2C%20axis%20Y%3DFD%2070%20(Ay%3D-0.0518g)%20and%20axis%20Z%3D%2040%20E8%20(Az%3D0.9995g)%22%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3EReg%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3Earding%20your%20conversion%2C%20AX%20should%20be%20negative%20FFE0%20(hex)%20%3D%20-32%20signed%2016%20bits)%20%3D%20-32%2F2%C2%B2%20%3D%20-4%20(signed%2014bits)%26nbsp%3B%20%3D%20-4*sensitivity%20(g%20or%20mg).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%22%3EAbout%20your%20reading%20function%2C%20it%20seems%20good%2C%20I've%20got%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CPRE%20__default_attr%3D%22c%2B%2B%22%20__jive_macro_name%3D%22code%22%20class%3D%22jive_macro_code%20jive_text_macro%20_jivemacro_uid_14512369879452619%22%20data-renderedposition%3D%22176_8_1232_320%22%20jivemacro_uid%3D%22_14512369879452619%22%3E%3CP%3Ebool%20FXLS8471Q%3A%3AbRead(uint8_t%20__u8_register%2C%20uint8_t*%20__au8_OutValue%2Cuint8_t%20__u8_length)%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool%20__b_result%20%3D%20false%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint8_t%20__u8_i%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20_t_cs%20%3D%200%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20_t_spi.write(%26nbsp%3B%20(__u8_register%26amp%3B0x7F)%20%7C%20(0x0%26lt%3B%26lt%3B7)%20)%20%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20_t_spi.write(__u8_register%26amp%3B0x80)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for(__u8_i%3D0%3B__u8_i%26lt%3B__u8_length%3B__u8_i%2B%2B)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__au8_OutValue%5B__u8_i%5D%20%3D%26nbsp%3B%20_t_spi.write(0x00)%20%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20_t_cs%26nbsp%3B%26nbsp%3B%20%3D%26nbsp%3B%26nbsp%3B%201%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__b_result%20%3D%20true%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20__b_result%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3Ebut%20again%2C%20check%20your%20conversion...%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAre%20you%20sure%20the%20FIFO%20is%20enabled%3F%20How%20did%20you%20configure%20the%20sensor%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAnthony%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-468686%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Error%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468686%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EHello%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EAnthony%3C%2FSPAN%3E%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EI%20do%20not%20get%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eproperly%20read%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eaccelerations%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3E32%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Erecords%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Estored%20in%20the%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EFIFO%3C%2FSPAN%3E.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EFor%20example%3C%2FSPAN%3E%2C%20%3CSPAN%20class%3D%22hps%22%3Ea%20reading%20of%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ethe%20acceleration%20of%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ethe%20three%20axes%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eis%3C%2FSPAN%3E%3A%26nbsp%3B%26nbsp%3B%20FF%26nbsp%3B%20E0%20FD%26nbsp%3B%2070%26nbsp%3B%2040%26nbsp%3B%20E8%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EWhere%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eaxis%20X%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ereading%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eis%3C%2FSPAN%3E%20%3D%20FF%20E0%20(AX%3D0.0024g)%2C%20axis%20Y%3DFD%2070%20(Ay%3D-0.0518g)%20and%20axis%20Z%3D%2040%20E8%20(Az%3D0.9995g)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EThe%20following%20data%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ecorrespond%20to%20a%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ereading%20of%20the%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EFIFO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hps%22%3EFor%20example%3C%2FSPAN%3E%3CSPAN%20class%3D%22shorttext%22%3E%2C%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22hps%22%3Eaxis%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EX%3C%2FSPAN%3E%20%3D7E%26nbsp%3B%20D8%20%2C%20axis%20Y%20%3D20%2060%26nbsp%3B%20and%20axis%20Z%20%3D00%2040%3CBR%20%2F%3E%207E%26nbsp%3B%20D8%2020%26nbsp%3B%2060%26nbsp%3B%2000%26nbsp%3B%2040%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20B8%26nbsp%3B%2020%26nbsp%3B%2038%2000%26nbsp%3B%2034%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20D8%26nbsp%3B%2020%26nbsp%3B%20B8%2000%26nbsp%3B%2030%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20D8%26nbsp%3B%2020%26nbsp%3B%204C%2000%26nbsp%3B%2018%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20E8%26nbsp%3B%2020%26nbsp%3B%2090%2000%26nbsp%3B%2034%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20F8%2020%26nbsp%3B%2064%26nbsp%3B%2000%2018%3C%2FP%3E%3CP%3E%207E%20F4%26nbsp%3B%2020%26nbsp%3B%2040%2000%26nbsp%3B%203C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20F4%26nbsp%3B%2020%26nbsp%3B%2030%2000%26nbsp%3B%2010%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20D8%26nbsp%3B%2020%26nbsp%3B%2078%26nbsp%3B%2000%203C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20C0%26nbsp%3B%2020%26nbsp%3B%2050%207F%26nbsp%3B%20F8%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20D0%26nbsp%3B%2020%26nbsp%3B%2040%2000%26nbsp%3B%2044%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20B0%2020%26nbsp%3B%206C%26nbsp%3B%2000%2044%20%3C%2FP%3E%3CP%3E%207E%26nbsp%3B%20E0%2020%26nbsp%3B%2050%26nbsp%3B%2000%2038%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20F0%26nbsp%3B%2020%26nbsp%3B%207C%2000%26nbsp%3B%2008%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20E0%26nbsp%3B%2020%26nbsp%3B%2038%2000%26nbsp%3B%2000%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20D8%2020%26nbsp%3B%2050%26nbsp%3B%2000%26nbsp%3B%2018%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20C0%26nbsp%3B%2020%26nbsp%3B%205C%2000%26nbsp%3B%2010%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20E0%2020%26nbsp%3B%2074%26nbsp%3B%2000%2018%20%3C%2FP%3E%3CP%3E%26nbsp%3B%207E%20E0%26nbsp%3B%2020%26nbsp%3B%207C%2000%26nbsp%3B%2010%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20D8%2020%26nbsp%3B%2090%26nbsp%3B%2000%2010%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20F0%2020%26nbsp%3B%2030%26nbsp%3B%2000%2030%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20E0%26nbsp%3B%2020%26nbsp%3B%2030%26nbsp%3B%2000%26nbsp%3B%2038%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20E8%26nbsp%3B%2020%26nbsp%3B%2060%2000%26nbsp%3B%2044%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20E8%2020%2058%26nbsp%3B%2000%26nbsp%3B%202C%20%3C%2FP%3E%3CP%3E%26nbsp%3B%207E%26nbsp%3B%20E0%2020%26nbsp%3B%2054%26nbsp%3B%2000%203C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20F4%26nbsp%3B%2020%26nbsp%3B%2088%2000%26nbsp%3B%2058%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20D8%26nbsp%3B%2020%26nbsp%3B%2060%2000%26nbsp%3B%202C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20B8%2020%26nbsp%3B%206C%26nbsp%3B%2000%2038%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20A8%2020%26nbsp%3B%2064%26nbsp%3B%2000%2020%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%20A8%26nbsp%3B%2020%26nbsp%3B%2064%2000%26nbsp%3B%2044%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%207E%20D0%26nbsp%3B%2020%26nbsp%3B%2060%2000%26nbsp%3B%2004%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%207E%26nbsp%3B%20E0%2020%26nbsp%3B%2058%26nbsp%3B%2000%207C%26nbsp%3B%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ELa%20function%20para%20leer%20los%20192%20bytes%20es%20la%20siguiente%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Evoid%20IMUREAD2(char%20reg1%2C%20int%20count%2C%20unsigned%20char%20array%5B%5D)%7B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Eunsigned%20int%20i%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Eunsigned%20char%20value%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Eunsigned%26nbsp%3B%20char%20dire%2C%20dire1%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Edire%20%3Dreg1%20%26amp%3B0x7F%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Edire1%3D%20reg1%20%26amp%3B0x80%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3ECS_FX%3D0%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3EWByteSPI1(dire)%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3EWByteSPI1(dire1)%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for(i%20%3D%200%3B%20i%20%26lt%3B%20count%3B%20i%2B%2B)%7B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20array%5Bi%5D%3DRByteSPI1()%3B%2F%2F%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3ENop()%3B%20%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20lang%3D%22EN-US%22%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3ECS_FX%3D1%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3Ereturn%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2Cserif%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22en%22%3E%3CSPAN%20class%3D%22hps%22%3EThank%20you%20very%20much%20and%20best%20regards%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22en%22%3E%3CSPAN%20class%3D%22hps%22%3ECarlos%20Canal%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-468685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Error%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Carlos%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EYes%2C%20the%20FIFO%20works%20with%20a%20800Hz%20data%20rate.%20You%20just%20have%20to%20configure%20the%20%3CEM%3ECTRL_REG1%3C%2FEM%3E%20register%20by%20resetting%20the%20%3CEM%3Edr%5B0%3A2%5D%3C%2FEM%3E%20field%20(to%20%3CEM%3E0b000%3C%2FEM%3E)%20.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20attached%20an%20application%20note%20about%20FIFO%20uses%20in%20the%20motion%20sensors%20if%20you%20want%20to%20take%20a%20look%20at.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHave%20a%20good%20day.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnthony%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-468684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Error%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20lang%3D%22en%22%3E%3CSPAN%20class%3D%22hps%22%3EHello%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EAnthony%3C%2FSPAN%3E%3A%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22hps%22%3EThank%20you%20very%20much%20for%20your%20cooperation.%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22hps%22%3EThis%20weekend%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EI%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ereport%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Emy%20code%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eand%20put%20it%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eon%20this%20page.%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22hps%22%3EI%20have%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Ethe%20following%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Equestion%3C%2FSPAN%3E%3A%20Can%20%3CSPAN%20class%3D%22hps%22%3Euse%20a%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3E800%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EHz%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EODR%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3Eto%20work%20with%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hps%22%3EFIFO%3C%2FSPAN%3E%3F%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22hps%22%3EThank%20you%20very%20much%20and%20best%20regards%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20lang%3D%22en%22%3E%3CSPAN%20class%3D%22hps%22%3ECarlos%20Canal%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-468683%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Error%20FIFO%20FXLS8471%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-468683%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Carlos%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ECan%20you%20share%20your%20FXLS8471%20configuration%3F%20%3CBR%20%2F%3EI%20also%20would%20like%20to%20take%20a%20look%20at%20your%20drain%20function%20which%20empty%20the%20FIFO.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHere%20my%20configuration%20if%20you%20want%20to%20compare%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CPRE%20__default_attr%3D%22c%2B%2B%22%20__jive_macro_name%3D%22code%22%20class%3D%22jive_macro_code%20jive_text_macro%20_jivemacro_uid_14508695130644306%22%20data-renderedposition%3D%22155_8_1232_656%22%20jivemacro_uid%3D%22_14508695130644306%22%20modifiedtitle%3D%22true%22%3E%3CP%3E%2F%2F%20CONFIG%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_CTRL_REG1%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x2A%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_CTRL_REG2%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x2B%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_CTRL_REG3%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x2C%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_CTRL_REG4%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x2D%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_CTRL_REG5%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x2E%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_XYZ_DATA_CFG%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x0E%3C%2FP%3E%3CP%3E%2F%2F%20ID%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_WHO_AM_I%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x0D%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_WHO_AM_I_VAL%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x6A%3C%2FP%3E%3CP%3E%2F%2F%20FIFO%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_F_SETUP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x09%3C%2FP%3E%3CP%3E%23define%20FXLS8471Q_F_STATUS%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x00%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Ebool%20FXLS8471Q%3A%3AvInit()%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool%20__b_result%3Dfalse%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint8_t%20__u8_temp%3D0xFF%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Check%20presence%20of%20the%20sensor%20to%20prevent%20SPI%20issues*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bRead(FXLS8471Q_WHO_AM_I%2C%26amp%3B__u8_temp%2C1))%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(__u8_temp%20%3D%3D%20FXLS8471Q_WHO_AM_I_VAL)%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FCheck%20Sensor%20ID%20answer%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Confugre%20the%20sensor%20*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_CTRL_REG1%26nbsp%3B%20%2C0x0))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FStandby%20mode%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_XYZ_DATA_CFG%2C0x2))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F0.976mg%2FLSB%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Configure%20the%20FIFO%20*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_F_SETUP%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2C0x80))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F%20FIFO%20mode2%20%3A%20stops%20accepting%20new%20samples%20when%20overflowed%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Configure%20the%20FIFO%20interrupt%20*%2F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_CTRL_REG3%26nbsp%3B%20%2C0x82))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F%20FIFO%2C%20interrupt%20active%20high%20(rising%20event)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_CTRL_REG4%26nbsp%3B%20%2C0x40))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F%20FIFO%20interrupt%20enabled%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_CTRL_REG5%26nbsp%3B%20%2C0x40))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F%20FIFO%20interrupt%20pin%20routed%20to%20INT1%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(bWrite(FXLS8471Q_CTRL_REG1%26nbsp%3B%20%2C0x11))%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FSet%20ODR%20to%20400Hz%20%26amp%3B%20active%20mode%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__b_result%3D%20true%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20__b_result%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CPRE%20__default_attr%3D%22c%2B%2B%22%20__jive_macro_name%3D%22code%22%20class%3D%22jive_macro_code%20_jivemacro_uid_14508696483152626%20jive_text_macro%22%20data-renderedposition%3D%22874_8_1232_336%22%20jivemacro_uid%3D%22_14508696483152626%22%3E%3CP%3E%23define%20FXLS8471Q_OUT_X_MSB%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x01%3C%2FP%3E%3CP%3Ebool%20FXLS8471Q%3A%3AbGetFIFOAccelData(int16_t%20__aai16_AccelData%5B32%5D%5B3%5D)%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint8_t%20__au8_Buffer%5B192%5D%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20int16_t%20__i16_SingleData%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint8_t%20__u8_i%2C__u8_j%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool%20__b_result%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(__b_result%20%3D%20bRead(FXLS8471Q_OUT_X_MSB%2C(uint8_t*)__au8_Buffer%2C192))%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for(__u8_i%3D0%3B__u8_i%26lt%3B32%3B__u8_i%2B%2B)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for(__u8_j%3D0%3B__u8_j%26lt%3B3%3B__u8_j%2B%2B)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__i16_SingleData%20%3D%20(int16_t)(%20(__au8_Buffer%5B__u8_j*2%2B__u8_i*6%5D%26lt%3B%26lt%3B8)%20%2B%20__au8_Buffer%5B__u8_j*2%2B__u8_i*6%2B1%5D)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20__aai16_AccelData%5B__u8_i%5D%5B__u8_j%5D%20%3D%26nbsp%3B%20(int16_t)(%20((float)__i16_SingleData)%2F4.0)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20__b_result%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3EGive%20me%20more%20information%20about%20your%20issues.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAnthony%3C%2FP%3E%3C%2FLINGO-BODY%3E