Is there a definitive guide for setting up i2c and discovering devices?
I've been diving through the forums and finding bits and pieces of info and a lot of inconclusive answers. Here's what I'm working with, which works sometimes but not others.
I'm using the Edison module on a mini breakout board with the i2c-6 pins broken out (I've also tested i2c-1 and get similar behavior to what I'll describe). This is connected to a PCA9603 level shifter, the same one Sparkfun uses on their PWM board, to shift from 1.8v of the Edison to 3.3v of my i2c devices.
I've got two chips I'm trying to work with PCA9634 LED driver and the LSM9DS0 accel/gyro/mag. I've tested them on the bus separately and together.
By testing I mean using
i2cdetect -y -r 6
Through various reboots I get one of these possible outcomes from the command:
- An empty table
- A kernel driver crash
- Driver complaining about losing arbitration
- The actual device addresses I'm looking for
I'm using the latest (ww05-15) and have tested with two different Edisons and two different mini breakout boards and I have reflashed them to make sure they're up to date. Successes I've had: Using the Sparkfun LSM9DS0 Breakout Board with the RTIMUlib-Arduino by using the workaround of changing the i2c port in the Arduino IDE, the example sketch puts out good data. Using a sketch that just starts Wire.h and then trying i2cdetect on i2c-6 from the command line. Some variations of this have worked for detecting both chips on the bus at the same time. But it's not consistent; I have no idea how to boot the Edison and know that it will detect something connected to i2c-6 without crashing.
My board successfully works with 3.3v i2c communication with both an Arduino and a Raspberry Pi.
I want to be able to configure the Edison on a mini breakout board for i2c-6 communication from the command line and then run i2cdetect without the kernel driver crashing.
How do I do this?
Searching the forums I found someone getting the loss of arbitration message, but they weren't level shifting properly. I also found out how to change the bus speed to standard mode thinking that slower communication might be less error prone. I successfully set it to 100kHz but still didn't detect anything.
echo std > /sys/devices/pci0000:00/0000:00:09.1/i2c_dw_sysnode/mode
Is this script still relevant? It was created before the most recent release.
Many of the commands in the i2c section of this guide give me a "write error: No such device" is that because I'm using a Mini Breakout Board and not the Arduino board?
Thanks for your help!