11-01-2023 10:11 AM
hello. How can I clear the BHI160B fifo and not have to do all init of the device again after the device is working ?
I have to clear the fifo sometimes when it is full with a lot of data and I don't have time to read it.
thanks.
11-01-2023 10:54 AM
Hi Eyalb,
You can call BHI160B sensor API to flush FIFO data without reset sensor.
bhy_set_fifo_flush(VS_FLUSH_ALL);
11-01-2023 11:33 AM
hello. I tried :
result = bhy_read_bytes_remaining(¤t_transaction_size);
/*printf ("IMU fifo %d bytes to read\n",current_transaction_size);*/
if (current_transaction_size > 60) /* eyalb - fifo too full */
{
max_transaction_size = current_transaction_size;
bhy_set_fifo_flush(VS_FLUSH_ALL);
result = bhy_read_bytes_remaining(¤t_transaction_size);
next_transaction_size = current_transaction_size;
}
and next_transaction_size is equal to max_transaction_size and not zeroized.
12-01-2023 02:51 AM
Hi Eyalb,
You can send the command 0xFE and see it again.
bhy_set_fifo_flush(0xFE);