[linux-dvb] I2C NAKs and fails to respond during init of TDA18211
mw_phil at yahoo.co.uk
Thu Nov 1 15:47:31 CET 2007
Michael Krufky <mkrufky <at> linuxtv.org> writes:
> On 11/1/07, MikeW <xx_xxxx <at> yahoo.co.uk> wrote:
> > Using the OM5776 eval board, and using the algorithm published
> > in the rev 1.1.0 datasheet, I find I am getting an I2C NAK,
> > which does not go away and requires a chip reset to restore
> > any I2C communication, after successfully writing EP4 (r06) in the
> > 'image rejection cal pt I, wanted signal measurement' section
> > where registers are written back.
> > (NAK occurs on write to EP5)
> While in calibration mode, the bytes of sub addresses 0x03 thru 0x0f
> must be written in one single i2c sequence.
Yes, I did consider this, but, annoyingly, the kernel I2C primitives
do not allow chaining of I2C buffers except as a 'repeated START'
transaction, hence you need to copy the register address
into a buffer followed by the data bytes, then send all as
one transaction. (Could implement by saving content of previous byte
in the reg map, replace with reg sddress value, sending bytes,
then restoring original value ...)
The data sheet flowchart actually says: "SubAddr(hex): 03 to 0F"
suggesting that separate writes would be permissible.
However, it's worth trying the single transfer approach.
The version 1.0.1 document is actually a little more explicit in some
cases, but I thought that since its version was earlier, it had been
superceded. Will have another look at the sequence there since
it's rather more prescriptive.
> Are you sure that you're using the exact algorithm from the datasheet?
> You're better off storing the values that you plan to write, then
> write them all at once in a single transaction.
> You might want to take a look at the tda18271 driver recently merged
> into the master branch, located under dvb/frontends ...
> Perhaps this driver might be enough to bring up the tda18211-- I don't
> have the spec for the 18211, so I cannot say that for sure, but I was
> under the impression that the tda18211 is exactly a tda18271, but DVB
> Let me know if there's anything that I can do to help you.
> Mike Krufky
Thanks for the suggestion !
More information about the linux-dvb