03-22-2019 02:42 PM
Hi all
I'm starting a new design and want to use the BMX160, but can't find the driver.
I've looked on the Bosch Sensortec GitHub page, but there is no driver there. https://github.com/BoschSensortec
The BMI160 driver is available on GitHub, but doesn't seem to be compatible with the BMX160.
Does anyone know where to download/clone the BMX160 driver?
Thanks
Solved! Go to Solution.
07-02-2019 09:21 PM - edited 07-02-2019 09:25 PM
Thanks for this note. I have 2 questions:
1) If I am using SPI comms with the BMX, should the BMM (tunneling through the auxillary interface of the BMI) also be SPI? Or does that remain I2C?
2) For the device ID for both the BMI and BMM, what should be used for SPI? For I2C, this is the default address, but it is unclear if this field needs to be set for SPI.
Thanks.
07-03-2019 09:27 AM
08-07-2019 09:31 PM
Hi o_o,
Thank you for your answer, that was very helpful. I am wondering if you could take a look at how I am setting up the aux interface on the BMX160. I referred to the Bosch application notes on the BMX160 wiki, but I am getting an error when I attempt to init the BMM, and there is very little information about this error.
// CS rising edge on power up to initiate SPI (pg 93)
BMX_CS = CS_DISABLED;
bmi.id = 0;
bmi.read = (bmi160_com_fptr_t)bmx_ReadByte;
bmi.write = (bmi160_com_fptr_t)bmx_WriteByte;
bmi.delay_ms = (bmi160_delay_fptr_t)bmx_Delay;
bmi.interface = BMI160_SPI_INTF;
//The BMM150 API tunnels through the auxiliary interface of the BMI160
bmm.dev_id = BMM150_DEFAULT_I2C_ADDRESS;
bmm.intf = BMM150_I2C_INTF;
bmm.read = bmm150_aux_read;
bmm.write = bmm150_aux_write;
bmm.delay_ms = bmx_Delay;
int8_t rslt;// = BMI160_OK;
bmi160_init(&bmi);
/* Configure the BMI160's auxiliary interface for the BMM150 */
bmi.aux_cfg.aux_sensor_enable = BMI160_ENABLE;
bmi.aux_cfg.aux_i2c_addr = bmm.dev_id;
bmi.aux_cfg.manual_enable = BMI160_ENABLE; /* Manual mode */
bmi.aux_cfg.aux_rd_burst_len = BMI160_AUX_READ_LEN_3; /* 8 bytes */
bmi160_aux_init(&bmi);
rslt = bmm150_init(&bmm);
// here rslt is BMM150_E_DEV_NOT_FOUND
08-08-2019 11:22 AM
08-08-2019 01:50 PM
Hi and thanks for getting back,
I was error checking each result, but just pulled those out in the example code. The BMI portion works perfectly - I can read the correct chip id, extract data, etc. Only the BMM part on the aux interface is acting funky. That error was generated from the BMM init. The chip id mismatch is confusing, because quite a few other things are successfully read up to that point (within the BMM init function).
I saw in another thread that the BMI chip id needs to be updated in the drivers (to 0xD8) - does the BMM chip id need to be updated as well?