Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA456 Data ready interrupt too late

    BMA456 Data ready interrupt too late

    Hoerz
    Member

    Hello all!

     

    I have a question (or a challenge) regarding the data ready interrupt of the BMA456.

    My wish would be quite simple, to read out the unfiltered acceleration sensor values every 2,5ms.

    Therefore I operate the sensor with 400Hz and configure the sensor with ACC_Conf.acc_perf_mode = 1 and ACC_Conf.acc_bwp = 0x02 (normal mode)

     

    I observed that about 4 samples are missed after configuration before the first data-ready interrupt occurs. In other words: I'd expect the data ready interrupt about 2,5ms after configuration but actually the data ready interrupt is triggered 12ms after configuration. All interrupts after the first interrupt come with a frequency of 400Hz. See following image:

     

     

    Hoerz_0-1671020538756.png

    If I change the configuration to ACC_Conf.acc_perf_mode = 0 and ACC_Conf.acc_bwp = 0x00 the sensor delivers the data as expected, see following image.

    How does the sensor behave when ACC_Conf.acc_perf_mode = 0 and PWR_CONF.adv_powersave = 0 are set at the same time?

    Unfortunately, this configuration is not described in chapter 4.3 of the BMA456 datasheet.

     

    Hoerz_1-1671020538758.png

    I thought that the following configuration would be correct for this:

    ACC_Conf.acc_perf_mode = 1

    ACC_Conf.acc_bwp = 0x02 -> designated as "normal mode"

    But this configuration does not work as expected (as shown above).

     

    My key questions are:

    - How does the sensor behave when ACC_Conf.acc_perf_mode = 0 and PWR_CONF.adv_powersave = 0 are set at the same time?

    - Why are approx. 4 samples missing when I use the configuration ACC_Conf.acc_perf_mode = 1 and ACC_Conf.acc_bwp = 0x02 (normal mode)?

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Hoerz,

    I setup example code on STM32 with bma456_an sensor API. Haven't reproduce your feedback missing 4 samples.

    test result.png

    In addition, you have to use the configuration in the power configuration table.

    power mode.png

    Hello BSTRobin!

    Thank you for trying to reproduce the problem.
    I am currently wondering why you receive data ready interrupts before the initialization has been completed.

    Hoerz_1-1673276244825.png

    At which point of time do you write to register (0x58) INT_MAP_DATA?
    Why is there such a long delay (more than 20ms) between writing to register 0x58 and init complete?

    Thank you very much in advance!

    Julian

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Hoerz,

    Data ready interrupt is usually mapped in the end of sensor configuration code, read the sensor data after the sensor configuration is completed.
    I upload my test code for your reference.

    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