DSPRelated.com
Forums

Re: =?gb2312?B?tPC4tA==?=: I2C Communication

Started by Jeff Brower January 9, 2008
Fang-
> I have tried one JTAG(receive) and one EEPROM boot(send), the received data have
> error still.
>
Well I would say it sounds like a transmit problem... but given your comments about
the nature of the bit-error, see my comments below.
> First thank your advice.
>
> The last version of my circuit board has been used in our company s product.
>
> In the last version , all function is ok including USB communication, SPI eeprom
> bootload.
>
> In this version, we only add I2C communication between two circuit board.
>
> Data error is that one send 3649 0x55 or 0xaa, the other receive 3649 data,
>
> some in 3649 received data is not 0x55 or 0xaa.for example , 0x75 .
>
How long is the connection (cable) between the two boards? Did you try a lower I2C
clock rate? How do the boards share Gnd -- within the same box? Or through wall
adapter (AC-to-DC) power supply? One possibility is that by using JTAG emulators
from two (2) separate PC, the boards see a nearly common Gnd, but when at least one
board is separated (no JTAG emulators) then the Gnd potential is slightly different
and I2C signals are not as clean.

My suggestion would be to send constant patterns of 0x55aa and watch the bits on a
dig scope. You might see some type of signal integrity issue that you can fix with a
buffer, pull-up R, etc.

-Jeff
> ------------
> : c... [mailto:c...] Jeff Brower
>
> ʱ200819 0:16
> : c...
> :Tobby Sun (SH, Research)
> : Re: [c55x] I2C Communication
> Fang Sun-
>
>> I am doing a project to communication between two C5509A in two circuit board
>>
>> with I2C interface.
>> DSP send data with I2C_write function, receive data with RDY interrupt. The
>>
>> First5509a send a command with I2C_write to the second 5509a, the second
>>
>> 5509a receive the command with RDY interrupt, and then send 3649 byte data with
>>
>> I2C_write, the first 5509a receive the 3649 byte with RDY interrupt.
>>
>> When I debug with two emulator in two PC, the two 5509a communication is OK.
>>
>> But when I burn program into eeprom in two circuit board separately. The two
>> circuit
>>
>> Board bootload with eeprom. I found the 3649 byte data which the first 5509a
>> received
>>
>> Have error.
>>
>> I have tried to lower I2C communication rate and shut off other interrupt. But I
>> found
>>
>> That communication is ok with emulator, while is bad with eeprom bootload.
>>
>> Can anyone give me some advice?
>
> First, what kind of "error"? Some bytes are bad? Not all bytes are received?
>
> Second, did you try one JTAG and one Flash boot? Then you would simplify the
> problem.
>
> Third some guesses. One obvious possibility is that code/data are not
> loaded/initialized exactly in Flash as with JTAG. You should make a test version
> of your code to do some type of forever-loop when it gets to main(), read all mem
> and store to a file, and compare the two methods. Note that with Flash boot, to
> read mem in this way you have to connect JTAG *after* the code has booted and has
> reached the test loop.
>
> Another possibility is that code/data is loaded/initialized Ok, but the presence of
> JTAG connection is causing slight differences in timing which somehow prove to be
> helpful, for example introducing some small delays in the low-level chip circuitry.
> You can try using the "Run Free" option (Debug menu) to eliminate JTAG
> communication and see if your USB communication fails.
>
> -Jeff
>