We are using the Invensense MPU6050 IMU on I2C with Beaglebone Black (Angstrom 3.8.13). We can use I2C-tools and file I/O thru /dev/i2c but the read speed is disappointingly slow. We only read the 3x gyros and 3x accels (each one byte at a time plus the 2 byte temperature reading) and it takes ~2msecs. My estimate of the I2C bus cycles for a block read suggests this should take ~160 bus cycles or .38msec on a 400MHz I2C bus.
The distribution includes the Invensense driver inv-mpu6050.ko but there is no indication that reading through /dev/i2c invokes it. This is a very popular IMU and Invensense widely distributes the driver over many Linux platforms. The driver source includes “successful installation will create two directories under /sys/bus/iio/devices” and lists the files there (aka functions). I can never get these to show up.
I can “insmod /lib/modules/3.8.13/kernel/drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko” and “echo inv-mpu6050 0x68 > /sys/class/i2c-adapter/i2c-1/new_device”. This causes a new directory named 1-0068 to show in /sys/class/i2c-adapter/i2c-1with entries like name and modalias but no functions. It never shows in /sys/bus/iio/devices.
What constitutes “successful installation”?
What else is needed to get the inv-mpu6050 to expose functions in /sys/bus/iio/devices like the driver sources says?
Beaglebone Black uses bone_capemgr for exposing driver functions for many devices. “echo inv-mpu6050 0x68 > /sys/devices/bone_capmgr.9/slots” raises the gripe “write error: no such file or directory”. (I can successfully load the am33xx_pwm driver this way.) Is this because there is no matching DT fragment in /lib/firmware? Is the inv-mpu6050 driver supposed to be invoked thru cape manager?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
P9_1->Gnd
P9_3->VCC
P9_19 ->SCL
P9_20 -> SDA
Your P9_19 SCL and P9_20 SDA should be fine.
Later posts suggest you can talk to you device and have shown us via W Smith the way to straighten out which bus is which.
Clark
Maybe that helps.
We got as far as using the MPU6050 and the MPU9150 via file I/O thru /dev/i2c. We never got the Invensense driver to work. It still looks like no one replying to the posts here has either. The disadvantage of the file I/O access approach is that it seems very slow compared to the relatively few I2C bus cycles required.
Clark
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/hqqecmOjpTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
We are using the Invensense MPU6050 IMU on I2C with Beaglebone Black (Angstrom 3.8.13). We can use I2C-tools and file I/O thru /dev/i2c but the read speed is disappointingly slow. We only read the 3x gyros and 3x accels (each one byte at a time plus the 2 byte temperature reading) and it takes ~2msecs. My estimate of the I2C bus cycles for a block read suggests this should take ~160 bus cycles or .38msec on a 400MHz I2C bus.
The distribution includes the Invensense driver inv-mpu6050.ko but there is no indication that reading through /dev/i2c invokes it. This is a very popular IMU and Invensense widely distributes the driver over many Linux platforms. The driver source includes “successful installation will create two directories under /sys/bus/iio/devices” and lists the files there (aka functions). I can never get these to show up.
I can “insmod /lib/modules/3.8.13/kernel/drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko” and “echo inv-mpu6050 0x68 > /sys/class/i2c-adapter/i2c-1/new_device”. This causes a new directory named 1-0068 to show in /sys/class/i2c-adapter/i2c-1with entries like name and modalias but no functions. It never shows in /sys/bus/iio/devices.
What constitutes “successful installation”?
What else is needed to get the inv-mpu6050 to expose functions in /sys/bus/iio/devices like the driver sources says?
Beaglebone Black uses bone_capemgr for exposing driver functions for many devices. “echo inv-mpu6050 0x68 > /sys/devices/bone_capmgr.9/slots” raises the gripe “write error: no such file or directory”. (I can successfully load the am33xx_pwm driver this way.) Is this because there is no matching DT fragment in /lib/firmware? Is the inv-mpu6050 driver supposed to be invoked thru cape manager?
Knowing this discussion is old, i have to ask did you get it working? And my experience is with the bbw, not the bbb. but the i2c buss on my device is 100khz. maximum is 400khz. I was able to get the accelerometer and gyro values at a rate of 200hz without issue, which isn't the max the chip can provide, but it's more than suitable for most applications. All through accessing /dev/i2c-#. If you havent got the driver to work yet, I can send you my tiny little C program that prints the data to the shell.
On Tuesday, October 15, 2013 5:02:59 PM UTC-5, clarkbr...@gmail.com wrote:
We are using the Invensense MPU6050 IMU on I2C with Beaglebone Black (Angstrom 3.8.13). We can use I2C-tools and file I/O thru /dev/i2c but the read speed is disappointingly slow. We only read the 3x gyros and 3x accels (each one byte at a time plus the 2 byte temperature reading) and it takes ~2msecs. My estimate of the I2C bus cycles for a block read suggests this should take ~160 bus cycles or .38msec on a 400kHz I2C bus.