05-25-2021 05:30 AM
Hi,
I am using LSM6DSOx accelerometer sensor. I am using FIFO to read the data. With 100Hz ODR, I get an interrupt in every 10s. This help me to put the system in sleep mode until data is available.
In the data sheet I see there is 9K memory available to store accelerometer and gyroscope data but I am unable to use it. Even after enabling compression, I can see only 3K getting used.
Please guide me how can I use the extra memory on board.
Below is the accelerometer configurations that I am using currently.
---------------------------------------------------------------------------------------------------------------------------
/* Restore default configuration */
lsm6dsox_reset_set(&dev_ctx, PROPERTY_ENABLE);
ACCL_DEBUG("Sent reset command\r\n");
do {
lsm6dsox_reset_get(&dev_ctx, &rst);
} while (rst);
/* Disable I3C interface */
lsm6dsox_i3c_disable_set(&dev_ctx, LSM6DSOX_I3C_DISABLE);
/* Enable Block Data Update */
lsm6dsox_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
/* Set full scale */
lsm6dsox_xl_full_scale_set(&dev_ctx, LSM6DSOX_2g);
lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_OFF);
/*
* Set FIFO watermark (number of unread sensor data TAG + 6 bytes
* stored in FIFO) to 10 samples
*/
//lsm6dsox_fifo_watermark_set(&dev_ctx, 0x1FF);
/* Set FIFO batch XL/Gyro ODR to 12.5Hz */
lsm6dsox_fifo_xl_batch_set(&dev_ctx, LSM6DSOX_XL_BATCHED_AT_104Hz);
/* Set FIFO mode to Stream mode (aka Continuous Mode) */
lsm6dsox_fifo_mode_set(&dev_ctx, LSM6DSOX_STREAM_MODE);
/* Enable drdy 75 μs pulse: uncomment if interrupt must be pulsed */
/* Uncomment if interrupt generation on Free Fall INT1 pin */
lsm6dsox_pin_int1_route_get(&dev_ctx, &int1_route);
int1_route.fifo_th = PROPERTY_ENABLE;
int1_route.fifo_full = PROPERTY_ENABLE;
int1_route.fifo_ovr = PROPERTY_ENABLE;
int1_route.fifo_bdr = PROPERTY_ENABLE;
lsm6dsox_pin_int1_route_set(&dev_ctx, int1_route);
/* Uncomment if interrupt generation on Free Fall INT2 pin */
//lsm6dsox_pin_int2_route_get(&dev_ctx, &int2_route);
//int2_route.reg.int2_ctrl.int2_fifo_th = PROPERTY_ENABLE;
//lsm6dsox_pin_int2_route_set(&dev_ctx, &int2_route);
/* Set Output Data Rate */
lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_104Hz);
lsm6dsox_compression_algo_init_set(&dev_ctx, 1);
lsm6dsox_compression_algo_set(&dev_ctx, LSM6DSOX_CMP_ALWAYS);
lsm6dsox_emb_sens_t emb_sens;
emb_sens.fifo_compr = PROPERTY_ENABLE;
lsm6dsox_embedded_sens_set(&dev_ctx, &emb_sens);
Solved! Go to Solution.
05-25-2021 07:15 AM
Hello jijuchacko,
This is Bosch, you could see our products from https://www.bosch-sensortec.com/products