Thank you for your reply. I recorded the i2c connection with my logic analyzer.
This is everything i could capture after a reset on my NUCLEO Board. When i try to read from the Sensor i get an NAK. Maybe the read function doesn work?
After i changed the read and write function from
// send register address
HAL_I2C_Master_Transmit(&hi2c1, DevAddress, &subaddress, 1, 1);
HAL_I2C_Master_Receive(&hi2c1, DevAddress, pBuffer, ReadNumbr, 1);
to
// send register address
HAL_I2C_Master_Transmit(&hi2c1, DevAddress, &subaddress, 1, HAL_MAX_DELAY);
HAL_I2C_Master_Receive(&hi2c1, DevAddress, pBuffer, ReadNumbr, HAL_MAX_DELAY);
the i2c capture looks like this.
What is your current result?
From the plotter, i can see the INT pins goes to high after download the FW. So look like you got successful download of FW.
What is the current status for bhy_driver_init function?
Right now my code wait until the interrupt fires to read and parse the fifo. But the Interrupt changes just one time after the fw download.
The Result of the function bhy_driver_init function is 0 as you can see in the screenshot.
OK, it is good news that the driver init is successfully.
Now you stuck at enable virtual sensor.
Can you check the return value of the following function?
bhy_enable_virtual_sensor
Can you also add the meta event call back to read out the sensor status? This can help us to understand your current issue and where you stucked.