Bosch Sensortec Community

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

    BMA456 Interrupt features without config file

    BMA456 Interrupt features without config file

    sulkith
    New Poster

    I"m triing to get the BMA456 running on a small Controller (Atmega32), the Controller features a Hardware I2C driver which is used directly.

    As written in the Datasheet(4.2.2) the BMA456 needs to be initialized with a configuration File.

    Since the controller in my project is very small I would like to use the Interrupt functionality without a big config string which needs to be stored in the Controller. Is this possible?

    In the datasheet it looks like this could be possible by writing directly to the FEATURES_IN(0x5E) Register.

    But this Register is used for more than one byte. The different bytes are addressed differently.

    So writing the anymotion "sub"-Registers should look like this?

    I2C_START 0x19(Address) 0x5E(Register) 0x00(SubRegister) 0x00 0xAA(Data for the Register(0x5E00))  0x00 0x05(Data for the Register(0x5E02))  I2C_STOP

    Is it also possible to read the Registers? e.g. by

    I2C_START 0x19(Address) 0x5E(Register) I2C_STOP I2C_START I2C_READ I2C_READ .... I2C_STOP

    With this Code i am getting 0x4D 0x4D 0x4D, but i expected the Standard Values for these registers?

     

    Best Regards

    sulkith

    3 REPLIES 3

    o_o
    Contributor

    Hello,

    The config file is not optional to use interrupts. In case you are lacking available memory in your MCU, look closely in bma456.c and you should see that the last 1.6kB of the config file is actually just padding bytes ("0x80, 0x2e, 0x18, 0x00"). You could write your own "compression" mechanism that sends these bytes on the bus without storing them into memory.

    Otherwise, you can load the config string into external memory.

    Hi,

    Would it be possible to use another modell like the BMA280 or the BMA253 for the NoMotion detection, without downloading a config file first?

    since the footprint for both of them seems to be the same, i could replace it by just swapping the chip and changing the Software a bit.

    The only difference is the PS Pin(11) which defines the Protocol version for the chip.What is the behavior of the BMA280/BMA253 if this Pin is not connected? Is this Pin actively  pulled to GND or VDDIO or is the behavior completely undefined?

    Best Regards

    sulkith

     

    From the datasheet, section 4.1 : "In case the I²C interface shall be used, a direct electrical connection between VDDIO supply and the PS pin is needed in order to ensure reliable protocol selection. For SPI interface mode the PS pin must be directly connected to GNDIO."

    As you can see, it is definitely not recommended to leave the pin floating. But indeed no-motion and any-motion interrupts are fairly simple, and the BMA253/280 have these interrupts implemented directly on the ASIC itself.

    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