02-16-2024 10:47 AM - edited 02-16-2024 10:58 AM
Hello Bosch Sensortec community,
I am working on a custom board with a BHI360 and a BMM350 connected as an external sensor in I2C. I am writing my own library to communicate from my host CPU to the BHI360.
Here are some information about my setup:
- I followed the BHI360 datasheet (4.1.2) to connect the BMM350 (see my schematic below).
- I successfully flashed the "BHI360_BMM350C" firmware.
- My host CPU can read the BHI360 Acc and Gyro data without any issue. (Although the gyro sensor self-test reports an Error 7: Multiple Axis Failed or Single Test Failed.)
- The BMM350 self test returns 0: Test passed. However, when I try to use any virtual sensor using the BMM350 (such as the Magnetometer corrected or the rotation vector), I have the following errors for the Magnetometer: (0x24 Sensor Error: No Valid Data) and (0x25: Slow Sample Rate).
- The virtual sensor rate is set to 100 Hz. I am using the non-wake up FIFO.
- The Physical sensor information for the BMM350 are shown below, one strange thing is that its Master interface flag bits are "0b1010", which is not one of the possibilities of Table 65.
Here are my questions:
- Do you have any idea why I cannot get data from the BMM350 ? Do I have to do additionnal configuration steps besides loading your firmware and starting a virtual sensor to make it work ? Do I need to manually configure the BMM350 using the soft pass-through feature of the BHI360 (13.2.4) ?
- Is there something wrong with my schematic ? I didn't wire the interrupt pin of the BMM350, is it mandatory?
- What can I do about the Gyroscope self-test error ? The output data looks ok, it's not 0 when still, but the variations when I move the sensor around make sense.
Thank you very much for your help.
Solved! Go to Solution.
02-29-2024 03:14 PM
Here is an update. I purchased some BHI360 shuttle boards 3.0 to make some tests:
- I connected the shuttle board to my MCU I2C line, (the same line where my own BHI360 is connected). I put the shuttle board SDO pin to high to be able to use the 0x29 address to connect to the BHI360 (my own BHI360 is at 0x28). I finally connected the shuttle board to my board 1.8V power line.
- Running my own code and your BHI360_BMM350C firmware, I was able to use the magnetometer as expected (no errors, self-tests passing).
- I was able to reproduce my errors (0x24, 0x25) by unsoldering R17 from the shuttle board (hence cutting the INT line of the BMM350).
This confirms that in order to use the BMM350 with the BHI360, the INT line from the BMM350 must be connected to the BHI360 JTAG_DIO pin. This information is nowhere to be found in all the documentation available. This made us loose a lot of time and it would be appreciated if you could update the firmware and sensor documentation for future custommers.
Moreover,@BSTRobin 's answer regarding the connection of the pin 4 (HIRQ) of BHI360 to the host MCU is factually wrong since I could make the shuttle board work fine without it using polling mode.
I still don't know why my BHI360 gyro self-test is not ok while the one of the shuttle board has no error, I'm looking into that.
02-29-2024 06:08 PM
@FCO_VK
Thank you for sharing your analisis!
I have the exact same symptoms (my post from 24.01. "BMM350 connected to BHI360 – hardware and firmware", although I had connected BMM350-INT, but unfortunately to BHI360-OCSB.
Concerning your failed self test of physical sensor 3: I have the same problem but after a while the test turns into "ok".
@Bosch_SensorTec
Is there a way to re-configure the firmware to read "OCSB" instead of "JTAG_DIO"?
03-01-2024 02:14 AM
Actually my question, if the OCSB-pin instead of the JTAG_DIO-pin could be read by the BHI360-firmware to detect new data by BMM350, was to rescue our prototypes with "wrong" wiring.
But now we detected that the JTAG-DIO-pin (pin 16) is an inner pin, more dificult to reach then the OCSB-pin (pin 10) which would make a more complex/more expensive hardware-design necessary.
That said, it would be more important for us to have the feature to use the BHI360-OCSB-pin to connect to BMM350-INT, i.e. again the question if that can be changed in the BHI360-firmware?
Additional question as alternative to keep hardware-design-complexity low: the pin 18 should be unused, same for pin 10, by the BHI360-firmware - would it be possible to use this two pins as "bridge" to make pin 16 accesible, i.e. connect pin 16 to pin 18, and pin 18 to pin 10 and pin 10 to BMM350-INT?
03-07-2024 03:23 PM - edited 03-07-2024 03:30 PM
For the record, I finally figured why my Gyroscope self-test was always failing : my PCB was facing down in debug mode (to be able to access my debug port). Therefore, I conclude that in addition to be stationnary and flat, the BHI360 needs to be facing upwards during self-tests to make them pass. As soon as I turn my board over, the self-test returns OK.
03-31-2024 10:18 PM
We appear to be in exactly the same boat. Were you able to get an answer about a firmware patch or different version of the firmware? In our case we had our board reviewed by Bosch and they were ok with using OSCB. Is there anyway to have the 360 not use interrupts from the BMM at all, it looked like interrupts were completely disabled for the older BMM150 @Bosch_SensorTec ?