Bosch Sensortec Community

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

    BMA456 Init Fails

    BMA456 Init Fails

    pratikyadav
    New Poster

    Hello,

     

    I am facing an issue while initializing BMA456, I am using PN7462 as a master.

     

    I have the following doubts.

    1) BMA456 init sequence required configuration file to load. As there is no documentation regarding how to load the configuration file. Some of the details of the register are not mentioned in the datasheet which is used in its driver file (https://github.com/BoschSensortec/BMA456-Sensor-API).

     

    2) As the 0x5E FEATURES_IN register is one byte how can we load the feature register?

    As per the application note “Wearable feature set” we can load feature configuration on ) 0x5E.

    How 0x5E register data will be mapped with which feature.

    Ex: if we load 0xE005 in 0X5E, then data will be used for "any motion" or "no motion"?

     

    3) I have tried to load the configuration file which is located in the “bma456.c” file, but still after loading the file INIT status is message shows not initialize. To load the configuration file I have used the following API.

    /*!

    * @brief This API writes the config stream data in memory using burst mode

    * @note index value should be even number.

    */

    static int8_t stream_transfer_write(const uint8_t *stream_data, uint16_t index, struct bma4_dev *dev)

    {

    int8_t rslt = -1;

    uint8_t asic_msb = (uint8_t)((index / 2) >> 4);

    uint8_t asic_lsb = ((index / 2) & 0x0F);

     

    /* Check the dev structure as NULL */

     

    if ((rslt == BMA4_OK) && (stream_data != NULL))

    {

    rslt = bma4_write_regs(0x5B, &asic_lsb, 1);

    if (rslt == BMA4_OK)

    {

    rslt = bma4_write_regs(0x5C, &asic_msb, 1);

    if (rslt == BMA4_OK)

    {

    rslt = bma4_write_regs(0x5E, (uint8_t *)stream_data, dev->read_write_len);

    }

    }

    }

    else

    {

    rslt = -1;

    }

     

    return rslt;

    }

     

    where read_write_len = 127, because at a time I am able to send 127  byte.  it’s call is as below:

    /* Write the config stream */

    for (index = 0; index < dev.config_size; index += dev.read_write_len)

    {

    stream_transfer_write((bma456_config_file + index), index, &dev);

    }

    I have written custom code based on https://github.com/BoschSensortec/BMA456-Sensor-API

    5 REPLIES 5

    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