11-21-2019 03:24 PM
Hi, does anyone have an example program integrating either of the below github repos that would work for ARM Ubuntu 18 (I’m using a NVIDIA Jetson TX2)? We’re currently trying to evaluate the BMI088 and BMM150 chips for a project, and I have a couple test programs that are currently able to somewhat communicate with the chips on their shuttle boards via I2C but I’m having issues using the functions i2c_smbus_read_block_data (Segmentation fault) and i2c_smbus_write_block_data (Error writing: Remote I/O error) in my user defined read / write functions. I’m happy to provide more info like pinout, source code, etc. but any working example program would most likely help me out tremendously. Thanks in advance!
https://github.com/BoschSensortec/BMI08x-Sensor-API
https://github.com/BoschSensortec/BMM150-Sensor-API
Solved! Go to Solution.
11-25-2019 07:18 AM - edited 11-25-2019 10:19 AM
From the issue description of "i2c_smbus_read_block_data (Segmentation fault) and i2c_smbus_write_block_data (Error writing: Remote I/O error) in my user defined read / write functions".
It is not an issue related to the sensor type. we recommend you take more careful about the usage of" i2c_smbus_read_block_data and i2c_smbus_write_block_data"
We have one example sensor driver to use "i2c_smbus_read_block_data (Segmentation fault) and i2c_smbus_write_block_data" below. You can see the example for this two functions.
https://github.com/torvalds/linux/blob/master/drivers/input/misc/bma150.c
11-26-2019 12:36 PM
Thank you so much for this example - it was extremely helpful! I ended up switching from "i2c_smbus_read_block_data" to "i2c_smbus_read_i2c_block_data" and now I am able to read what appears to be live data from both chips.