[i2c] AT91 bus driver loses data
Ronny Nilsson
rln-i2c at arbetsmyra.dyndns.org
Thu Feb 15 15:12:55 CET 2007
> > unfortunately scheduling introduces communication errors. I'm not
> > sure why but likely due to some other code path disables interrupts
> > for to long. Busy waiting works fairly well (but not perfect!),
> > system performance is degraded
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> No kidding, eh?
>
> OK, I see it's hard-coded to 100kHz in the driver. Try dropping that
> to ~10kHz and see what happens. If things still don't improve, then
> you can either try to find and kill the big interrupt blocker or slow
> down the bus even more.
Hi
I totally agree, busy waiting is awfully awkward! I spent about two
days just for trying to get wait_event() working before giving that
up... It *is* possible to reduce the wire speed though as a workaround.
At a clockrate of 50 kHz it works fairly well to sleep the system
friendly way. If adding some safety margin we get about 30 kHz.
However, I was thinking that no one would accept that kind of slow
speed so I discarded it. I'm not sure of what speed a bit banging
interface achieve but I'm imagining it's in that range too.
I can rollback to wait_event_timeout(), but is people going to accept
that low speed?
Regards
/Ronny
More information about the i2c
mailing list