Bosch Sensortec Community

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

    BMA456 Simple read of Acceleration Values

    HBUDE
    Member

    BMA456 Simple read of Acceleration Values

    Hello,

    we are using BMA456, connected to a uC via SPI Interface.

    In first step, I simply want to read the acceleration data registers, and I wrote a small program according to the steps described in "Example 2" of the data sheet.

    But the readout of the registers is always Zero.

    What am I doing wrong, resp. what do I have to do to make it work ? Is there any further initialisation/configuration necessary ? If so, does anybody have a code example for this ?

    I downloaded the driver API, but there is a lot of code inside which I do not (yet) understand.

    I searched the net carefully, but could not find any help or information....

    Thanks in advance, bye

    Harald

    8 REPLIES 8
    BSTRobin
    Community Moderator

    Re: BMA456 Simple read of Acceleration Values

    Hello HBUDE,

    In this example code, it demos how to read the acceleration data.
    https://github.com/BoschSensortec/BMA456-Sensor-API/blob/master/examples/bma456/generic/acceleromete...

    HBUDE
    Member

    Re: BMA456 Simple read of Acceleration Values

    Hi BSTRobin,

    thanks for your quick answer and for providing the application code example.

    But I think there are functions inside which require additional C modules. In the Github folder .../examples/generic/..  I can see more C modules and Header files. Which of them are necessary to be included ?

    Sorry, I can surely search for this, but if you can provide this information, it will surely reduce my effort...

    However, I will try to adapt the code to my target and hope I will make it work. If not, I will surely get back here 🙂

    Thanks in advance, bye bye

    Harald

    BSTRobin
    Community Moderator

    Re: BMA456 Simple read of Acceleration Values

    Hello HBUDE,

    In https://github.com/BoschSensortec/BMA456-Sensor-API/blob/master/examples/bma456/generic/bma4_common...., you could see some empty function in this file. BMA456 driver code was portable, you should implement these host platform related functions, then it will work on your platform.

    HBUDE
    Member

    Re: BMA456 Simple read of Acceleration Values

    Hi Robin,

    thanks for quick information !

    I think I can make it work now. Otherwise I‘ll get back...

    Thanks again, best regards
    Harald
    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