Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2019 12:39:34 +0200
From:      Per Hedeland <per@hedeland.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Karl Denninger <karl@denninger.net>, freebsd-arm@freebsd.org
Subject:   Re: I2c producing crazy console messages [[Re: insanely-high interrupt rates -- PARTIAL resolution (Pi2)]]
Message-ID:  <c745bfea-4dce-1212-62c1-6410f2eef87b@hedeland.org>
In-Reply-To: <bdf9fb604e7b4a54d3f0085bd7223c9d6b1679c4.camel@freebsd.org>
References:  <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> <669892ac3fc37b0843a156c0ab102316829103fd.camel@freebsd.org> <663f2566-b035-7011-70eb-4163b41e6e55@denninger.net> <20190325164827.GL57400@cicely7.cicely.de> <3db9cf8a-68ee-e339-67bf-760ee51464fd@denninger.net> <fc17ac0f77832e840b9fffa9b1074561f1e766d8.camel@freebsd.org> <d96c7f42-f01b-8990-a558-ee92d631b51d@denninger.net> <dc56a8964cae942354cbe2b5b0620f2eebb569bb.camel@freebsd.org> <874l7fyrpr.fsf@news-spur.riddles.org.uk> <701e011f-3088-8ed4-4fbb-6fa93ac698f5@denninger.net> <aefa1d778e7684f71ffed49ce32ee80e2273d033.camel@freebsd.org> <67133e19-2be5-ccd1-2ded-008b36a866ec@denninger.net> <6f6f8471-8624-c5e2-547c-42b712254126@denninger.net> <ec6a5200c9c0b255094f6a46a1d2f95cd9334ea6.camel@freebsd.org> <8bcdb1e1-e561-6255-848d-e532ad4d5918@denninger.net> <499b53d5-23ed-c33b-3715-018720c536a3@hedeland.org> <bdf9fb604e7b4a54d3f0085bd7223c9d6b1679c4.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-04-19 18:04, Ian Lepore wrote:
> On Fri, 2019-04-19 at 13:32 +0200, Per Hedeland wrote:
>> But anyway I would be *extremely* surprised if I saw them, since
>> AFAIU
>> the i2c bus per se has no concept of interrupts - you need to connect
>> some other wire from the device to e.g. a gpio pin (with appropriate
>> config) in order to generate interrupts - and I haven't done that.
>> (The
>> ads1015 does have an ALERT/RDY pin that could potentially be used for
>> it, but since FreeBSD AFAIK doesn't have a way to deliver the
>> interrupts to userland code, I had no interest in it.)
> 
> You're thinking about this all wrong.  The interrupts have nothing to
> do with the i2c bus, but the i2c controller still uses interrupts to
> signal things like "trasnfer done" or "fifo empty".

OK...

> If there's nothing
> on the bus, you don't end up doing any transfers, so you don't get any
> spurious interrupts.

That much is clear even to me, but I'm doing 128 transfers/second
without seeing any spurious interrupts. But I guess my observation
matches the second alternative in one of your earlier messages (where
the first alternative, as far as I understood, was about interrupts
from the i2c device itself...) - i.e. interrupts being dispatched to
multiple cores. This obviously can't happen on the RPi 0/1 that I've
tried, since they're single-core.

--Per

> I can't reproduce this using RTC or EEPROM chips.  We use ADS1013 parts
> at $work, I may have some around here somewhere.  If so, I'll see if I
> can reproduce the problem using them.
> 
> -- Ian
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c745bfea-4dce-1212-62c1-6410f2eef87b>