Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Use 9K memory for FIFO on LSM6DSO for storing accelerometer and gyroscope data

    Use 9K memory for FIFO on LSM6DSO for storing accelerometer and gyroscope data

    jijuchacko
    New Poster

    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);

    1 REPLY 1

    BSTRobin
    Community Moderator
    Community Moderator

    Hello jijuchacko,

    This is Bosch, you could see our products from https://www.bosch-sensortec.com/products

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist