Re: [Balloon] I2C troubles on Balloon 3

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Chris Jones
Date:  
To: balloon
Subject: Re: [Balloon] I2C troubles on Balloon 3
On 17/08/2011 17:52, Paul Fidler wrote:
> On Aug 17 2011, Wookey wrote:
>
>> +++ Chris Jones [2011-08-17 13:31 +0100]:
>>> Hello all,
>>>
>>> I know some people in the Balloon community have done a lot more
>>> work with I2C than I have. I'm now using I2C more intensively and
>>> having some problems. It works most of the time but will more or
>>> less randomly give up and say, 'i2c-pxa: timeout waiting for bus
>>> free'. Adding some debug to the i2c code shows that the PXA's I2C
>>> controller is claiming to be busy at these times. Has anyone else
>>> seen this?
>>
>> No, or at least not that I've noticed. My solar controller is using
>> I2C down about 60cm of unshielded wire and has generally been
>> reliable. It does sometimes jam up but I think that's at the 1-wire or
>> OWFS level, not I2C, although it's hard to be sure.
>> This is all with a very old kernel now (2.6.26 or so and OABI) so may
>> not be directly relevant to current experience. PaulF is the real I2C
>> expert.
>
> I wouldn't call myself an expert...
> I have seen transient I2C errors, probably caused by spikes on the
> bus, when using I2C to talk to a PIC that was driving a 12V DC
> motor (via an L293). It was usually best to avoid turning the motor
> from full on to full reverse as the next I2C message was then usually
> missed.
>
> I don't actually recall whether I had that specific error ('i2c-pxa:
> timeout waiting for bus free') although I may well have done. I have
> seen a few 'timeout' style messages over the years, most of them
> entirely due to dodgy soldering (usually my own). These errors were
> generally due to shorts with either SDA or SCL to either high, low, or
> each other. On one occasion the 'short' was actually the presence on the
> bus of a PCF8574 which had been previously been fried by a student.
> Removing it made everything work again...


This is all very useful, thank you. I take that you both were using the
CUED breakout board? If so, it contains a sneaky I2C buffer/protection
arrangement which is supposed to make the bus more robust. That's
different to what I'm working with, which is the raw bus from the PXA.
Robustifying the electrical arrangements seems to be helping (thanks to
Steve's hints off-list) but I am a bit concerned that the kernel can get
its I2C driver so wedged as a result of a bit of an upset on the bus.
It's an analogue world, after all.

Chris

--
Chris Jones -
Martin-Jones Technology Ltd c/o Element Energy Ltd
Twenty Station Road, Cambridge, CB1 2JD, UK
Phone +44 (0) 1223 655611 Fax +44 (0) 870 112 3908