I am trying to get the BHI160 to start. However, after uploading the RAM patch successfully the BHI160 generates an error meta event and stops working. More precisely, I can read the following sequence of bytes from the FIFO: "0xFD, 0x00, 0x00, 0xFC, 0x8F, 0x04, 0xFE, 0x04,
0x22, 0x15". According to the datasheet (Table 29), "0xFD, 0x00, 0x00" and "0xFC, 0x8F, 0x04" are timestamp events and "0xFE, 0x04,
0x22, 0x15" is a meta event signaling an error.
My question is, how to interpret the two payload bytes of this event? The datasheet states, that byte 1 contains the "Error Register" and byte 2 the "Debug State", but I cannot find any documentation on either of them.
Could we know detailed information about your hardware and software:
1. Whch detailed sensor part you used? BHI160, BHI160B or other BHI160xx part?
2. What is the driver code and firmware you used?
the part is a BHI160B and the firmware is the standalone BHI160B firmware provided here: https://www.bosch-sensortec.com/media/boschsensortec/downloads/firmware/bhi160_b_firmware/20210616_u...
I tried to get it to work with the Arduino driver (https://github.com/BoschSensortec/BoschSensorHub) and a self-developed driver. The self-developed driver runs on bare-metal and does not use any Arduino related code. However, I used the communication logging feature of the Arduino driver and our custom one to compare them and they produced the same output. Finally, I compared it to the bhy1 driver (https://github.com/BoschSensortec/BHy1_driver_and_MCU_solution.git) by using a mocked I2C function, which resulted in the same sequence of I2C transactions (the mocked I2C return the correct ROM version and CRC when requested). Therefore, I reckon, the initialization sequence is fine and the I2C communication is working properly. Also, the RAM version is reported after enabling the CPU.
You could refer attachment code that I run it well with github driver code on STM32.
For BHI160B, you need include this firmware:
#include "Bosch_PCB_7183_di03_BMI160-7183_di03.2.1.11696_170103.h"//For BHI160B