Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5


Discussion Groups

Discussion Groups | TMS320C55x | Re: I2C Communication

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

I2C Communication - "Tobby Sun (SH, Research)" - Jan 8 7:47:56 2008



Hi all,

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 

First 5509a 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?

Thanks

Fang Sun



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: I2C Communication - Karthik Balaguru - Jan 8 12:32:22 2008






Apart from those mentioned earlier.
Also check if the processor's clock circuit has proper capacitance by cross-verifying with the corresponding processor's manual. That can also lead to this .
 
Karthik Balaguru
-----Karthik Balaguru/LNTINFOTECH wrote: -----

To: c...@yahoogroups.com
From: Karthik Balaguru/LNTINFOTECH
Date: 01/08/2008 08:25PM
cc: <c...@yahoogroups.com>
Subject: Re: [c55x] I2C Communication

Hi,
There can be lot of reasons for this.
1) Improper Bootloader
2) Improper external Clock
3) Improper checking in emulator
 
Improper Bootloading also can land you in some ' la-la ' (weird) land of memory
maybe some offset before / after that can also affect this.
 
But, interestingly, sometimes some processor's clock
will take time to settle at the first instance (Probably few micro seconds/ milli seconds /
seconds). :(:( . So, it is better that as soon as you boot up,
have some 'nop' / 'wait states'. That should mostly fix this if it is related with it.
Even with serial communication (doing some loopback check while bringing up the board initially), we can get some junk character as the first character
but the later set of characters will be fine. So, in that senario, it is normal to
skip few initial bytes(allowing the clock to settle).
 
Sometimes, it can be some careless checking using emulator :(:(
(Unnoticed timing offset / frequency / Improper Addressing of device , etc...) :(
 
Karthik Balaguru
 
-----c...@yahoogroups.com wrote: -----

To: <c...@yahoogroups.com>
From: "Tobby Sun \(SH, Research\)" <T...@fortebio.com.cn>
Sent by: c...@yahoogroups.com
Date: 01/08/2008 02:38PM
Subject: [c55x] I2C Communication



Hi all,

I am doing a project to communication between two C 5509A in two circuit board


with I 2C interface.
DSP send data with I 2C _write function, receive data with RDY interrupt. The


First 5509a send a command with I 2C _write to the second 5509a , the second


5509a receive the command with RDY interrupt, and then send 3649 byte data with


I 2C _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 I 2C 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?


 



Thanks

Fang Sun

 

__._,_.___

NEW!  You can now post a message or access and search the archives of this group on DSPRelated.com:
http://www.dsprelated.com/groups/c55x/1.php< /a>

_____________________________________
About this discussion group:

Archives: 
http://www.dsprelated.com/groups/c55x/1.php< /a>

To Post:  Send an email to c...@yahoogroups.com

Other DSP Related Groups:
http://www.dsprelated.com/groups.php







__,_._,___


(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: I2C Communication - Karthik Balaguru - Jan 8 13:13:22 2008






Hi,
There can be lot of reasons for this.
1) Improper Bootloader
2) Improper external Clock
3) Improper checking in emulator
 
Improper Bootloading also can land you in some ' la-la ' (weird) land of memory
maybe some offset before / after that can also affect this.
 
But, interestingly, sometimes some processor's clock
will take time to settle at the first instance (Probably few micro seconds/ milli seconds /
seconds). :(:( . So, it is better that as soon as you boot up,
have some 'nop' / 'wait states'. That should mostly fix this if it is related with it.
Even with serial communication (doing some loopback check while bringing up the board initially), we can get some junk character as the first character
but the later set of characters will be fine. So, in that senario, it is normal to
skip few initial bytes(allowing the clock to settle).
 
Sometimes, it can be some careless checking using emulator :(:(
(Unnoticed timing offset / frequency / Improper Addressing of device , etc...) :(
 
Karthik Balaguru
 
-...@yahoogroups.com wrote: -----

To: <c...@yahoogroups.com>
From: "Tobby Sun \(SH, Research\)" <T...@fortebio.com.cn>
Sent by: c...@yahoogroups.com
Date: 01/08/2008 02:38PM
Subject: [c55x] I2C Communication



Hi all,

I am doing a project to communication between two C 5509A in two circuit board


with I 2C interface.
DSP send data with I 2C _write function, receive data with RDY interrupt. The


First 5509a send a command with I 2C _write to the second 5509a , the second


5509a receive the command with RDY interrupt, and then send 3649 byte data with


I 2C _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 I 2C 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?


 



Thanks

Fang Sun

 

__._,_.___

NEW!  You can now post a message or access and search the archives of this group on DSPRelated.com:
http://www.dsprelated.com/groups/c55x/1.php< /a>

_____________________________________
About this discussion group:

Archives: 
http://www.dsprelated.com/groups/c55x/1.php< /a>

To Post:  Send an email to c...@yahoogroups.com

Other DSP Related Groups:
http://www.dsprelated.com/groups.php







__,_._,___


(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: I2C Communication - Jeff Brower - Jan 8 15:07:19 2008

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


(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

=?gb2312?B?tPC4tDogW2M1NXhdIEkyQyAgQ29tbXVuaWNhdGlvbg==?= - "Tobby Sun (SH, Research)" - Jan 8 23:59:08 2008

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 .

________________________________

发件人: c...@yahoogroups.com [mailto:c...@yahoogroups.com] 代表 Jeff Brower
发送时间: 2008年1月9日 0:16
收件人: c...@yahoogroups.com
抄送: 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



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

=?gb2312?B?tPC4tDogW2M1NXhdIEkyQyAgQ29tbXVuaWNhdGlvbg==?= - "Tobby Sun (SH, Research)" - Jan 9 0:28:55 2008

I have tried one JTAG(receive) and one EEPROM boot(send), the received data have error
still.

________________________________

发件人: c...@yahoogroups.com [mailto:c...@yahoogroups.com] 代表 Jeff Brower
发送时间: 2008年1月9日 0:16
收件人: c...@yahoogroups.com
抄送: 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



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )