Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > flash EEPROM with I2C

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



flash EEPROM with I2C
Moderator:
RSKV

Post Reply
Follow this topic



flash EEPROM with I2C

mc posted on 28 Sep 2009 10:15 AM PST
Senior Member
13 Forum Posts
Hi,

I tested vend_ax programm with:
CY3684 USB 2.0 DEVELOPMENT BOARD
I think I damaged the large EEPROM because the board is not recognized anymore.
Is there a way to set the Large EEPROM back to its default value or flash:
C:\Cypress\USB\Examples\FX2LP\EEPROM Images\
on it.

Thanks,





Re: flash EEPROM with I2C

aasi posted on 28 Sep 2009 06:24 PM PST
Cypress Employee
1090 Forum Posts
use the switch to disable the EEPROM.... plug in the board... Now enable the EEPROM and reprogram it with whatever firmware you like...

Re: flash EEPROM with I2C

mc posted on 29 Sep 2009 12:38 AM PST
Senior Member
13 Forum Posts
Hi,

I followed your suggestion without success:
1- plug off USB cable
2-set EEPROM ENABLE to NO EEPROM
3-set EEPROM SELECT to LARGE EEPROM
4-plug USB cable
5-set switch EEPROM ENABLE to EEPROM (as you said)
6-try to flash with EZ-USB Interface and S EEPROM (I used Fx2LP_C0.iic from EEPROMImages folder) but it failed
EZ-USB Interface application said EEPROM not enabled as if the switch did not work while the board is powered.

Thanks,


Re: flash EEPROM with I2C

aasi posted on 29 Sep 2009 12:52 AM PST
Cypress Employee
1090 Forum Posts
S EEPROM is used to program the small EEPROM... either you have not switched the EEPROM enable switch properly or you have not switched the other switch from large eeprom to small eeprom...

Re: flash EEPROM with I2C

mc posted on 29 Sep 2009 03:13 AM PST
Senior Member
13 Forum Posts
How do I program the big EEPROM?


Re: flash EEPROM with I2C

mc posted on 29 Sep 2009 03:27 AM PST
Senior Member
13 Forum Posts
sorry for the stupid question. lg EEPROM of course.


Re: flash EEPROM with I2C

aasi posted on 29 Sep 2009 03:39 AM PST
Cypress Employee
1090 Forum Posts

Is your problem solved???
Just on a friendly note: There is no stupid question, it is either simple or complex.



Re: flash EEPROM with I2C

mc posted on 29 Sep 2009 04:01 AM PST
Senior Member
13 Forum Posts
Thanks a lot for great support so far (also on other threads)
What I am actually trying to do is as follows:
First things first.
I implemented firmware, driver (linux, windows, mac os) and hardware interface in VHDL for following chip:
CY7C68013A: USB High-Speed Peripherals > EZ-USB FX2 / FX2LP
This all works perfectly and some of our enciris LT101 boards have been chipped to clients already.

For the driver I implemented custom driver with our own device and product ID.
I flashed a 4096x8 bit EEPROM (M24C32) attached to FX2LP using S EEPROM command with our firmware.
After flashing the deevice is not seen anymore by cypress tools (normal).
But now I want to update the firmware.
What is the best approch:
1- try to implement a vendor command like the one in vend_ax in my own firmware (I have some troubles doing that). and used vendor commands to flash EEPROM.
2-try to download vend_ax from our driver and flash the EEPROM like above using A2 vendor command. Not sure this is feasible.
3- other strategy...
Maybe you have a beter idea what to do?

Thanks,


Re: flash EEPROM with I2C

aasi posted on 29 Sep 2009 11:51 AM PST
Cypress Employee
1090 Forum Posts
Say when u say u use s eeprom button... the prime thing to understand is that FX2LP talks to the EEPROM assuming that it is a single address EEPROM... so it can address only 256 Bytes... You can see what might be happening right... you are talking to a EEPROM which needs two byte addressing by using single byte addressing... using vend_ax is the best way to go as far as i know... or for a mass production environment... you can program one EEPROM checks it working... then take that EEPROM and copy its image and write the same to many EEPROM using a manufacturing end EEPROM programmer....

Re: flash EEPROM with I2C

mc posted on 30 Sep 2009 04:15 AM PST
Senior Member
13 Forum Posts
Ok,
I think I am almost done.
I copied the vend_ax example to my FW and I can perform read access.
One think is unclear to me though:
I am using the following command from vend_ax:
I2C_Addr = SERIAL_ADDR | ((I2CS & 0x10) >> 4);
which will be 0x51, but my EEPROM address is 0xA2 (but I did not tell that the FW)
How does firmware know the correct address of the attached EEPROM?


Re: flash EEPROM with I2C

mc posted on 30 Sep 2009 10:38 AM PST
Senior Member
13 Forum Posts
additionally to the question:
How does firmware know the correct address of the attached EEPROM?
Do you know why I2C write (to eeprom) IOCTL commands must be in chunks of 16?
When I send chunks of 64bytes or above, write process will fail (when using VR_EEPROM vendor command)

I got everything to work but still these 2 questions remain.

Thanks,

Re: flash EEPROM with I2C

aasi posted on 07 Oct 2009 04:29 AM PST
Cypress Employee
1090 Forum Posts
The EEPROM address is not known by the firmware. You will have to take care of that in your firmware...
Regarding the chunks of 16 byte transfer that you are talking about can you point me to which doc u r referring to... one thing i can think of is that I2C speed is much lower than USB speed... Here the data is being sent to the buffer of EP0 (a endpoint which cannot say no to setup commands) so if before the write to I2C slave is completed, if the next request comes in the it'll corrupt the data of the previous transfer...

Re: flash EEPROM with I2C

malax07 posted on 13 Oct 2009 02:12 AM PST

1 Forum Post
Hello, i have fx2lp cy3684/3674.
Can I install eeprom 24LC512-I/SM 512K, SO8, 32Kx8, 2.5V, EEPROM vice 24lc128.


Will it work?
What models of memory eeprom i can use? I want upgrade my fx2lp

Re: flash EEPROM with I2C

andy posted on 21 Oct 2009 10:46 AM PST
Senior Member
16 Forum Posts
"How does firmware know the correct address of the attached EEPROM? "

Most standard "boot" EEPROMS actually do have a standard address and don't even have pins to set it. If you look in the Reference Manual it explains what these standard addresses and also what "assumptions" the hardware makes about them in terms of the boot sequence.

Re: flash EEPROM with I2C

vanhalessio posted on 16 Jun 2010 01:53 AM PST
Member
5 Forum Posts

I read the discussion above with interest. 

Could you please tell me if I'm right or wrong?

1- Using FX2LP internal firmware/data  (no EEPROM firmware download and no firmware has been downloaded into RAM - first stage, just standard VID/PID/DID), the firmware download is possible thanks to the 0xA0 vendor request, which is the only vendor request available at this stage.

2- 0xA9 (large EEPROM load) MUST be implemented as a vendor request in a custom firmware. Otherwise, you can use vend_ax firmware example to download it.

3- Which technology cyConsole implements to program small and large EEPROM at the first stage (without any firmware other than the internal FX2LP information)?

Thanks in advance for your help






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20