Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA400 Watermark Issue

    BMA400 Watermark Issue

    Mari
    New Poster

    Hi to all,

    I have issue with my BMA400, the sensor is managed by a PIC18 on I2C bus. I configured the sensor by following the official example code on GitHub. 

    The configuration of the sensor is:

    - ODR=25Hz => 25frame/s => 175bytes/secondo @12-bit di risoluzione
    - range=2g
    - normal power mode set
    - interrupt active low, push-pull on INT1 pin

    - active FIFO watermark on x,y, z axis, watermark=217bytes ( => 31(frame)x7), NO sensortime, teaming mode enabled.
    - set latching mode (interrupt cleaned after status interrupt read out)
    - FIFO_WM_INT is enabled and mapped on INT1 pin

    The init phase follow the diagram above:

    Mari_0-1709222600426.png

    One flush cmd is sent before to enable the interrupt.

    Every time the FIFO wm trigger the interrupt, a dedicated routine was called, the flow chat of is:

    fifo_wm.png

    the operations are more or less the same on example code done in the example file (https://github.com/boschsensortec/BMA400_SensorAPI ).

    And now the problem that I see:

    - if I use ODR>25Hz, after the first FIFO wm complete acquisition, the other are incomplete, by increasing the ODR, the lost frame are increasing too, but with the oscilloscope I can see the change of the pin state;

    - so, i fixed the ODR to 25Hz, but I  notice that the accelerations are very similar for every fifo wm, for example in picture below, in left side the sensor is upside-down compared with the position (and acceleration) on right side

    fifo compare.png

    - after the extraction and print of the accelerations, a flush cmd is sent and after that I must repeat the FiFO configuration, otherwise I can't see a new interrupt.

    I also used as refernce the documents "How to use BMA400 FIFO.pdf".

    I'm sure that the problem is on FIFO configuration, but I don't know/understund what I'm missing or what I'doing wrong. I hope, someone in the community could help me....

    To exclude an hardware problem, I also simulate a FIFO wm by using "data ready" with interrupt and in my opinion, it is working, I can modify the configurations and I read correclty the acceleration data when the sensor is moved in all the directions!

    Thanks to all,

    Mari

     

     

     

    6 REPLIES 6

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Mari,

    What power mode is the sensor in when you read FIFO data?

    Hi BSTRobin,

    the sensor is in normal mode.

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Mari,

    Could you provide your BMA400 software code for check?

    Sure BSTRobin!

    Attached the folder with the ode I'm using.

    During the initilization the routine I call is "acc_bma400_init()" and the routine I call when the interrupt occurs is "fifo_wm_on_host()". The comments are mixed italian and english....

    Thanks

    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