07-14-2022 04:18 PM
Hello,
I'm using a BHI260AB hosted by an STM32 over SPI. I have a BMM150 also connected to the BHI and they are successfully communicating (I can use any virtual sensors that make use of the magnetometer).
I have the following layout on my custom PCB:
So I've set the orientation matrixes to the following values:
After setting the orientation matrixes of the three physical sensors, I attempt to read the "Physical Sensor Information" parameters from the Parameter Interface. I want to read back the orientation matrixes to verify that they were correctly stored into the chip. For this, I send the following command to the Command Interface (for reading the accelerometer parameters):
According to the datasheet, I should get the following information on the Status and Debug FIFO (payload of 20 bytes):
But instead, I'm getting the following on the Status and Debug FIFO:
What could be the issue? Why I'm not getting the right information on the Status and Debug FIFO? The Status and Debug FIFO is configured in the default mode (Synchronous mode).
BR
Solved! Go to Solution.
07-15-2022 08:16 AM
Hi btruden_henway,
Did you call bhy2_get_orientation_matrix() function to get matrixes value?
07-15-2022 12:06 PM
Hello BSTRobin,
I don't use the Bosch API on my microcontroller, I was not able to make it work properly. I implemented my own API.
Do you have a logic analyzer's capture showing the SPI data exchange (between the host MCU and the BHI chip) during the execution of the bhy2_get_orientation_matrix() function?
BR
08-10-2022 10:52 AM
Hi btruden_henway,
Sensor API is easy to be migrated to different platform with little adapter interface, like write, read, delay interface.
It is recommended that you run the sensor API and modify it based on the sensor API after it works normally.
08-11-2022 09:10 PM
Hello BSTRobin,
The main problem is that the API adapter interface uses blocking functions. And that's not acceptable in our application.
However, I've found the problem. There's a mistake in the datasheet. Please notify the corresponding sector in the company to do the correction.
The parameter 0x0121 (and 0x1121 for writing) corresponds to the Physical sensor ID = 1, not 0. The sensor ID = 1 corresponds to the accelerometer. So the parameter 0x0121 corresponds to the accelerometer, the 0x0123 to the gyroscope and the 0x0125 to the magnetometer.
Best regards.