Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    I'm trying to interface an nRF52832 to the BMA456 and load a config file

    I'm trying to interface an nRF52832 to the BMA456 and load a config file


    Hello everyone,

    I am attemping to interface an nRF52832 to the BMA456 and load a step counter/tracker. Has anyone already done this and if not does anyone have any ideas of how to get started? 

    27 REPLIES 27

    Hello Minhwan,

    Thank you very much for getting back to me. The commented out sections were only for trouble shooting purposes and have been used most of the time while testing. I believe the configuration file is falsely saying it has loaded correctly as when I print out the accelerometer x, y, z the numers do not seem like they are correct. The 'y' never changes and the other two do change but the numbers are very large. I haven't gotten any error codes everything says it is enabled correctly but I do not believe it actually is. When I read the register 2A after loading the configuration file the register does read as a 1. But when troubleshooting further the accelerometer doesn't seem to be properly updating with real world influence. The burst read seems to only show all zeros when enabling the step tracker and accelerometer.

    The sensor works perfectly when using an arduino and the grove sensor. The code (for the arduino) uses Bosch API but an older version (year 2018 ish). When I connect it to the nrf52832 it says it's working (no error codes) but doesn't acrue steps or create accurate accelerometer output. I have used a separate sensor (BMA456 shuttleboard) and the application board 3.0 and they worked exactly as they were supposed to. I would appriciate any help and insight you may have. Thank you very much for your help.

    Community Moderator
    Community Moderator

    Hi @Jar444 , 


    Okay, so here is your situation. 

    1) Arduino + BMA456 - Working fine 

    2) App3.0 + BMA456 shuttle board - Working fine 

    3) nrf52832 + BMA456 shuttle board - Some issue. 

    I assume that you are using same board for test 2,3 , right? Interestingly, App3.0 board also based on nrf52 series. 

    If you are using same board and same API for test 2,3 , we need to appoach different way. 

    Or, if you are using different board, could you switch it and check it? 

    Thank you. 


     Finally got it!!! I had to add a reset (bma_set_command_register(0xB6,&bma) after bma456_init(&bma) and before bma456w_write_config_file(&bma). (I hope this is actually the solution and not just a fluke).

    Community Moderator
    Community Moderator

    Yes, it can be a solution depends on your application scenario. 🙂 

    Good to hear. 


    I have now moved from a dev kit to a custom board. I am using an nRF52832 and the BMA456. I am getting a -2 communication fail error and would love some advice. The SDO and CSB pins are connected to the nRF52832 and then are pulled to VDDIO

    #1 Would this cause an issue?

    #2 Is it better to just connect then directly to VDDIO?

    We were hoping to be able to choose either SPI or I2c by wiring the pins to the nRF52832. This would give us more options if the I2c version was more power hungry than the SPI. Thank you for all of your help in advanced.