[U-Boot-Users] soft or hard I2C code for AT91RM9200?

David A. Peters davidp at matrixproductdev.com
Wed Sep 15 20:29:38 CEST 2004


I was able to get it working by adding an I2C_SCL(0) and I2C_DELAY at the
beginning of send_ack.  I'm not sure why, but it works.

-----Original Message-----
From: u-boot-users-admin at lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of VanBaren,
Gerald (AGRE)
Sent: Wednesday, September 15, 2004 9:47 AM
To: U-Boot Users List
Subject: RE: [U-Boot-Users] soft or hard I2C code for AT91RM9200?



> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of David A.
> Peters
> Sent: Wednesday, September 15, 2004 10:07 AM
> To: U-Boot Users List
> Subject: RE: [U-Boot-Users] soft or hard I2C code for AT91RM9200?
> > > I have the soft I2C working except for one small problem.  > When I
try to
> read more than 2 bytes from the eeprom, I get the first two bytes, and
> anything else that follows is 0xFF.  I've verified that data > is written
to
> the eeprom in other locations.  I am using a 24AA256.
> Has anyone else seen this problem?
> > -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of David A.
> Peters
> Sent: Tuesday, September 14, 2004 3:10 PM
> To: U-Boot Users List
> Subject: [U-Boot-Users] soft or hard I2C code for AT91RM9200?
> > > Does anyone have I2C code for the AT92RM9200 that they would > be
willing to
> share?  I am trying to get the soft I2C working, but I am struggling.
> Thank you!


Do you have the "alen" set to 2?  The 24AA256 has two bytes of address.
"Returning" 0xFF sounds like the chip is not responding for the reads after
the first two bytes.

How did you verify the data you wrote?  If you are using the read that you
complained about, you cannot be sure it is reading _anything_ right (e.g. if
your addressing is wrong, you likely are writing to the same wrong location
that you are reading from).

If all else fails, hook up a logic analyzer (or digital scope).  This is the
most efficient way to debug i2c problems.

gvb


******************************************
The following messages are brought to you by the Lawyers' League of
IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain
confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to legal
privilege.  If you have received this e-mail in error you should notify the
sender immediately by reply e-mail, delete the message from your system and
notify your system manager.  Please do not copy it for any purpose, or
disclose its contents to any other person.  The views or opinions presented
in this e-mail are solely those of the author and do not necessarily
represent those of the company.  The recipient should check this e-mail and
any attachments for the presence of viruses.  The company accepts no
liability for any damage caused, directly or indirectly, by any virus
transmitted in this email.
******************************************


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users






More information about the U-Boot mailing list