2024-01-22 03:32 AM
I am using the IIS3DWB sensor and have a question about reading data from the FIFO.
Currently, I use the following function to retrieve one set of x, y, z values at a time:
int32_t iis3dwb_fifo_out_raw_get(stmdev_ctx_t *ctx, uint8_t *buff)
{
int32_t ret;
ret = iis3dwb_read_reg(ctx, IIS3DWB_FIFO_DATA_OUT_X_L, buff, 6);
return ret;
}
If I want to retrieve 1024 sets of data at once, can I modify it like this:
ret = iis3dwb_read_reg(ctx, IIS3DWB_FIFO_DATA_OUT_X_L, buff, 1024 * 6);
Will this allow the SPI to fetch all 1024 sets of data in a single cycle?
Additionally, I am using the sensor's FIFO feature with an ODR set to ODR/10, resulting in approximately a 2.6 kHz data FIFO buffer rate. I am interested in reading the buffer data at once when the COUNTER_BDR_IA flag is enabled.
Solved! Go to Solution.
2024-01-22 05:35 AM - edited 2024-01-22 05:36 AM
Hi @HKim.23 ,
You can retrieve 1024 sets of data at once, please refer to our drivers on github to develop this correctly using the multiread function:
Yes, you can read the buffer data at once when the COUNTER_BDR_IA flag is enabled.
2024-01-22 05:35 AM - edited 2024-01-22 05:36 AM
Hi @HKim.23 ,
You can retrieve 1024 sets of data at once, please refer to our drivers on github to develop this correctly using the multiread function:
Yes, you can read the buffer data at once when the COUNTER_BDR_IA flag is enabled.
2024-01-22 05:17 PM
Thanks, Federica.
I will try it.