Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA490l initialization problem python

    BMA490l initialization problem python

    LongToeBoy
    Member

    Hello. just got BMA490l accelerometer. i wanted to configure it from configuration array provided in github by bosch. array is posted in bma490l.c as a variable "const uint8_t bma490l_config_file[] = {....}"

    im trying to initialize the ic with python script:

    image.png

     

    but looks like the last print statement always prints 0x00. can anybody help me?

    5 REPLIES 5

    Vincent
    Community Moderator
    Community Moderator

    I saw you use np.reshape(configue_file, (50,26),  it looks like you seperate the configure string into small package. 

    But if you write into 0x5E directly,  you must write the whole configure string in one burst write.

    If you want to separate them into small piece because of burst write length limitaion of the platform,  you also need to use register 0x5C and 0x5B (our DMA engine).   You can take reference into our API for how to use them. 

     

    thanks for your reply. unfortunately i dont have logics analyzer plotter and cant even afford one. time delay is in seconds (500 us so 0.0005 secs). what i think the problem is that i cant really burst write more than 32 bytes of data using SMBus library. datasheet says its not a problem to get multiple burst writes as far as bytes are even number. but still, im thinking that for some reason BMA490l doesnt recognise this kind of receiving routine. im just guessing at this point because i really dont know what is happening right now. have you ever tested the unit with python?

    Vincent
    Community Moderator
    Community Moderator

    Yes, we have our internal test setup based on Python also.  Unfortunately, those test script can't share out.

    As i mentioned previously,  if you separate into small group,  you can't only use 0x5E,  you also need to use register 0x5B and 0x5C which is not mentioned in our datasheet yet.

    But you can refer to the API example code on how to use them. 

    And it should work properly after you download the string correctly.

    its been so long and i still havent resolved my problem... cant find a fix. from the example code on github i cant really get any useful algorithm besides just a configuration file. it would be nice if i could somehow test the board. i like your sensors, are pretty accurate and well documented. but not this one and i understand because its so fresh.

    can you once again please tell me if this code should or shouldnt be working
    image.png

    i added register address in config file data so now it should be writing to that address the whole data (according to i2c protocol). unfortunately the initialization test print still shows 0x00 and not 0x2a

    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