I2C setup

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

I2C setup

Postby pedro » Fri Oct 30, 2015 12:04 pm

Hello,
I want to use I2C for communication with peripherals however I can't get it working. My board is Wandboard Quad. Running Yocto installation, kernel 3.10.31. I can see /dev/i2c-0, /dev/i2c-1 and /dev/i2c-2 on the file system.

What I have or what I tried:
1) I have enabled i2c in CPU devicetree
2) Connected a sensor to I2C pins on JP2 connector.
3) Connected signal analyser.
4) Played with i2cdetect tool. When I test the I2C port with cables connected it takes long to scan for devices (however with no result). When I plug out the cables it scans quickly so I think the board is aware of the device presence as if the i2c bus was working. During detection there is no signal on the analyser (the pin is in "1" state all the time).
5) Tried to use examples from http://elinux.org/Interfacing_with_I2C_Devices - what I get is read/write error with no sign of signal on the analyser just like above.
6) I found another example: https://xgoat.com/wp/2007/11/11/using-i ... -in-linux/ but I'm missing in my poky SDK functions starting with "i2c_smbus" what might be a reason? Maybe that's an issue here?

Is there somewhere a good how-to to get I2C running on the board? It is very important for me to get it working for out product.
Any help appreciated.

Pedro
pedro
 
Posts: 1
Joined: Fri Oct 30, 2015 11:51 am

Re: I2C setup

Postby bkpawar » Tue Feb 09, 2016 5:25 am

There might be possibility that gpios are multiplexed. You need to configure those gpio for i2c functionality in board specific kernel file.
bkpawar
 
Posts: 9
Joined: Mon Feb 08, 2016 9:00 am

Re: I2C setup

Postby Richard » Mon Feb 15, 2016 9:58 am

Hello, pedro:

It looks like the I2C signal is latched by the I2C device you add.
When you perform "i2cdetect", can you see the I2C address of this device shows ?

BR,

Richard
Richard
Site Admin
 
Posts: 138
Joined: Tue Dec 17, 2013 6:57 am


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 3 guests

cron