[MinnowBoard] MinnoboardMax I2C and Kernel 3.18.1 ACK problem

Michael Jones mike at proclivis.com
Sat Jan 3 00:09:04 UTC 2015


Solved

By using shorter wires, it works. Apparently, the master in the Atom does not like a glitch on the SDA with the SCL rises during the ACK. The cause is the bus accelerator yanking up the CLK. So if you use one, be sure to prevent cross talk between SCL and SDA.

My error was only looking at the scope on the slave side. During capturing of trace data and scope shots I took one more on the master side in case someone wanted to see it, and I saw it :-(

So I am using Kernel 3.18.1 and Ubuntu 14.04 with I2C on the low voltage connector now without problems.

Mike

On Jan 2, 2015, at 1:27 PM, John 'Warthog9' Hawley <warthog19 at eaglescrag.net> wrote:

> On 01/02/2015 12:03 PM, Michael Jones wrote:
>> I am having some problems getting I2C to work with Kernel 3.18.1.
>> 
>> Has anyone made I2C work on MinnowboardMax with 3.18.1 release? Where works means, i2cdetect can see devices on /dev/i2c-7 or can run extras.
> 
> Can, or can not?  The statement is a little oddly written so I just want
> to be clear if it works or not.
> 
>> In my case, I am seeing bad behavior on the bus when monitoring with a scope. An ADDRESS + R is placed on the bus, then the clock line remains high for 15ms during the ACK, followed by a STOP. I see similar behavior with my own application where ADDRESS + W does the same thing, and it looks like it retries multiple times. All with known working hardware and code that runs on a Wandboard with Yocto Linux.
> 
> What code is this, it might be helpful if we try to replicate this when
> we are back in the office next week?
> 
>> To test further I ran minnow-max-extras/hse/hse-i2c-eeprom.sh and it fails to write. It actually prints:
>> 
>> Error: Write failed
>> Error: Write failed
>> Error: Read failed
> 
> So the hse directory there refers to the High Speed Expansion, I.E. the
> connector on the bottom of the board, not the 0.1" pins on top of the
> board, so it's unlikely going to work as written.
> 
> This brings up an obvious question: are you attaching to the HSE (bottom
> high-density connector) or the LSE (0.1" pins on top).
> 
> It would also be helpful to know:
> 
> - What devices, specifically, are you attaching to where (model numbers
> would be helpful if we try to replicate)
> 
>> My code can ioctl the /dev/i2c-7 and get a reasonable return from FUNCS. I am pretty sure the driver is all in place, or I would not get back a reasonable FUNCS list.
> 
> does i2cdetect show the devices on the bus at the addresses you are
> expecting?
> 
>> 
>> Details on my version of OS.
>> 
>> Installed Ubuntu 14.04.
>> 
>> Compiled new 3.18.1 kernel  after merging http://www.elinux.org/images/e/e2/Minnowmax-3.18.txt
>> 
>> I used the release candidate version of this kernel for some UART code which worked fine. That confirms no general IO problems.
>> 
>> I am not a kernel expert, so I am at a loss as to how to debug. Is there some logging I can turn on that might give some clues about what is going on in the driver? Perhaps there is a weblink with info on debugging the i2c driver?
> 
> Has this worked on previous kernels?
> 
> If you are in a multi-master situation this particular bug is tickled
> pretty hard:
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=6927
> 
> which is a hardware change / fix and will be present on the A4 boards,
> but those haven't gone to production yet.
> 
> It would help immensely to know what your setup is so we can double
> check it on Monday (assuming my inboxes are not a complete disasters)
> and try it for ourselves, otherwise I'm most likely going to just test
> with a calamari and a 3.18.something kernel (though I'm pretty sure I've
> tested that and it worked, but I'm not 100% sure right now if it was
> 3.18 or 3.17)
> 
> - John 'Warthog9' Hawley
> _______________________________________________
> elinux-MinnowBoard mailing list
> elinux-MinnowBoard at lists.elinux.org
> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard




More information about the elinux-MinnowBoard mailing list