FXLS8967AF - read FIFO?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FXLS8967AF - read FIFO?

1,088件の閲覧回数
andrewneil
Contributor III

I don't find the datasheet at all clear on how to read out the values from the FIFO.

Is it necessary to repeatedly read the individual triplets

 

for each triplet
{
   sensor_comm_read( handle, FXLS896xAF_BUF_X_LSB, 6, data );
}

 

 

Or will a single burst read get all the triplets

 

sensor_comm_read( handle, FXLS896xAF_BUF_X_LSB, number_of_triplets*6, data );

 

 

ie, does the auto-increment loop-back from BUF_Z_MSB to BUF_X_LSB so long as there is more data in the FIFO?

0 件の賞賛
返信
7 返答(返信)

1,072件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello andrewneil,

I hope all is great with you. Thank you for using the NXP communities.

The byte order of the output data is programmable via SENS_CONFIG2[LE_BE], and defaults to little-endian mode.

If SENS_CONFIG2[F_READ] = 1, the auto increment mechanism skips over the MSB registers. This operation shortens the output data size from 6 bytes to 3 bytes per XYZ sample.

I do recommend downloading the driver example from the link below and using it as a reference for your design.

Sensor Drivers for NXP Sensors

diazmarin09_0-1708020777152.png

 

I hope this information helps.

Regards,

David

0 件の賞賛
返信

1,060件の閲覧回数
andrewneil
Contributor III

I'm sorry, that doesn't answer the question at all.

The question is, to read the entire FIFO:

  1. can I read the entire FIFO with a single burst read, or
  2. must I do multiple burst reads - one for each (X,Y,Z) triplet ?

In other words, what happens in a burst read after reading BUF_Z_MSB (0x11):

  • does it "loop-back" to BUF_X_LSB (0x0C), or
  • does it carry on to PROD_REV (0x12) ?

I have downloaded the drivers - they do not illustrate this.

0 件の賞賛
返信

1,029件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello andrewneil,

Please accept my apologies for the misunderstanding.

You are correct, should perform multiple burst reading procedures to read the entire buffer.  

Regards,

David

0 件の賞賛
返信

990件の閲覧回数
andrewneil
Contributor III

@diazmarin09 - should perform multiple burst reading procedures

Really?

As already noted, that Table 20 in the datasheet is very confusing:

https://community.nxp.com/t5/Sensors/FXLS8967AF-Confused-by-quot-Auto-increment-Address-quot/m-p/178...

But I think I've now managed to figure it out:

 

andrewneil_0-1708511825039.png

So a Normal (F_READ=0) burst read of 13 bytes starting at 0x0B should get:

  1. BUF_STATUS (0Bh)
  2. BUF_X_LSB  (0Ch)
  3. BUF_X_MSB  (0Dh)
  4. BUF_Y_LSB  (0Eh)
  5. BUF_Y_MSB  (0Fh)
  6. BUF_Z_LSB  (10h)
  7. BUF_Z_MSB  (11h)
  8. BUF_X_LSB  (0Ch)
  9. BUF_X_MSB  (0Dh)
  10. BUF_Y_LSB  (0Eh)
  11. BUF_Y_MSB  (0Fh)
  12. BUF_Z_LSB  (10h)
  13. BUF_Z_MSB  (11h)

Yes ?

Or have I still not understood Table 20 ?

 

0 件の賞賛
返信

980件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello andrewneil,

I know that Table 20 is indeed confusing, but your understanding is correct. I mean, that is the expected registers sequence with the auto-increment feature and F_READ=0.

Regards,

David

0 件の賞賛
返信

976件の閲覧回数
andrewneil
Contributor III

Good.

So it should require just one burst to read the entire FIFO?

BUF_STATUS[BUF_CNT]  indicates the number of triplets required, so the total burst length required would be six times the BUF_STATUS[BUF_CNT] value ?

I know that Table 20 is indeed confusing

It certainly is!

I will update the other thread on that topic:

https://community.nxp.com/t5/Sensors/FXLS8967AF-Confused-by-quot-Auto-increment-Address-quot/m-p/178...

 

0 件の賞賛
返信

965件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello andrewneil,

BUF_STATUS[BUF_CNT]  indicates the number of triplets required, so the total burst length required would be six times the BUF_STATUS[BUF_CNT] value?

You are correct, my apologies for the confusion. I do appreciate your efforts. 

Regards,

David