cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to read 2040 bytes of data from FIFO of ISM330DLC at t time ?

JPale
Associate II

Hi,

I would like to read data from FIFO at a stretch in ISM330DLC. Elaborately, I have set an Water Mark Interrupt to 0x3FC in FIFO mode and i would like to read total number of bytes at a time.

Is it possible to read?

If i Read like that will the WMI happens again or not?

if so how the WMI wil work in such case?

Thanks & Regards,

Jhansi P

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @JPale​ , if I well understood you would like to read the FIFO content until the watermark is reached, right? If so, you should set your device in FIFO mode as described in the app note AN5125 p.84. Consider that the FIFO_CTRL4 register contains the bit STOP_ON_FTH, which allows limiting the FIFO depth to the watermark level.

0693W000001rqc7QAA.png

You may check also these examples (on another device) to check if you correctly set the FIFO.

Regards

JPale
Associate II

sorry! unfortunately i replied in answer session.

Hi Eleon BORLINI,

Thank you for the reply,

Your understanding is correct, i would like to read data upon WMI and sensor set to FIFO mode.

And i am not setting sensor to Bypass after reading data , i just continuing to read next set of data.

I have seen the example you sent, in that lsm6dsm_fifo_raw_data_get funtion reading 6 bytes of data for one iteration.

  1. But, I would like to read 1024 byte (WMI threshold limit) for one iteration.

For instance "libsoc_spi_rw(spi_dev,FIFO_DATA_OUT_L | 0x80,readData,1024))". And i am able to read data as well but to make sure i am reading correctly i need clarity on FIFO filling mechanism. I thought it is like Q mechanism! is My understanding is correct?

2.From the application note i understood like this,

Total FIFO depth is 3KB, My WMI threshold is 1KB, i red all the data (1KB) at a stretch upon WMI trigger then, the FIFO continue to fill from 1025 location.

if that is like that will i get correct data if read like below?

while(condtion)

{

if(WMI)

{

libsoc_spi_rw(spi_dev,FIFO_DATA_OUT_L | 0x80,readData,1024))

process data;

}

}

Can you please provide me the necessary info regarding the above.

Best Regards,

Jhansi P