Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Slow i2c problem
From: "Johannes Stezenbach" <js@convergence.de>
> That means the double PSR read method you mentioned above is tested
> and works on Windows? I'm sure MiHu will apply this to the Linux
> saa7146 driver then.
Whoops, sorry, it reads the IICSTA register twice, of course, not the PSR.
And yes, it works on Windows with the two cards I have, using the 275kHz
bus clock (IIRC, I checked the data sheets on all components on the cards,
and the lowest I2C clock for one component was 400kHz, so the 412.5kHz
clock was out, and 275kHz appeared reasonably safe).
FWIW, my code:
- writes to IICTRF, IICSTA and then to MC2 (UPLD_IIC)
- reads IICSTA once (ignoring the result)
- reads IICSTA and loops while (IICSTA & (IICSTA_ERR | IICSTA_BUSY)) ==
IICSTA_BUSY, up to 100,000 times (the number is so high, so that you can
also use the slowest I2C bus clock, in which it can take a couple thousand
reads to finish; with 275kHz clock, IIRC it only reads about 100 times or
so)
These are all the SAA7146A register accesses my code makes during an I2C
bus transfer.
Again: I get _zero_ I2C errors with this code, it is working perfectly
fine, and delivering the full I2C bus speed at the same time :)
Regards,
--
Robert Schlabbach
e-mail: robert_s@gmx.net
Berlin, Germany
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index