Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > I2C E2PROM

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



I2C E2PROM
Moderator:
RSKV

Post Reply
Follow this topic



I2C E2PROM

clh23047 posted on 16 Jul 2012 12:51 AM PST
Top Contributor
65 Forum Posts

Hello, I read through the posts about the I2C EEPROM bootloader in the forum. I am still not clear how to do this. My purpose is as following:

(1) Download the firmware into the E2PROMs on the DVK board (2*128Kbytes E2PROMs).
(2) When I power on the board again, the firmware is loaded from the E2PROMs.
(3) Update the firmware in the E2PROMs later through the same USB connector.
 
In my understanding, I need to check the UsbI2cRegMode example as the first step. Once it works, I can insert these commands into my final program. Am I right? Could someone point me out what are the approximate steps I should do?
 
In the USB Control Center, when I choose Program->FX3->I2C E2PROM, the CYUSB3.sys for the CYUSB3.0 Driver is asked for. I link the original CYUSB3.sys to it, but it is invalid and the window appears again. What could I do about this?
 
Thank you very much
Lehua Chen



Re: I2C E2PROM

RSKV posted on 16 Jul 2012 02:14 AM PST
Cypress Employee
655 Forum Posts

Hi Lehua Chen,

Here are my answers to your questions:

In my understanding, I need to check the UsbI2cRegMode example as the first step. Once it works, I can insert these commands into my final program. Am I right? Could someone point me out what are the approximate steps I should do?

<RSKV>

To download the .img file into the EEPROMs connected to FX3 device, you don't need to add anything in the firmware.

You can directly programm the EEPROMs using the Control Center. Open USB control center --> Programm --> FX3 --> I2C EEPROM. Then it will automatically download a boot programmer and enumerate as "Cypress EZ-USB FX3 Boot Programmer". Then a pop up window will open and ask you for the .img file. Here you should be pointing the .img file that you want to put into EEPROMs.

<RSKV>

In the USB Control Center, when I choose Program->FX3->I2C E2PROM, the CYUSB3.sys for the CYUSB3.0 Driver is asked for. I link the original CYUSB3.sys to it, but it is invalid and the window appears again. What could I do about this?

<RSKV>

When it is enumerating as "Cypress EZ-USB FX3 Boot Programmer", it might ask you for the .inf file. Please point to the .inf file which has VID_04B4&PID_4720.

<RSKV>

 

Regards,

sai krishna.

 



Re: I2C E2PROM

clh23047 posted on 16 Jul 2012 04:00 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

Thank you for your reply. In the .inf file, the VID_04B4&PID_4720 is already in. When it is enumeratted as "Cypress EZ-USB FX3 Boot Programmer", it shows ‘Cypress Boot Programmer Device Not Found’ (as shown in the attachment) and it asks for a .sys file (I can not choose other file extension). I point it to the cyusb3.sys and it will ask again.
I have re-installed the software for one time. That may be the reason. After I inactivate the driver for the usb and activate it by point to .inf file, then ‘Cypress EZ-USB FX3 Boot Programmer’ appears. Unfortunately, the E2PROM programming fails.
I use two 24FC1026 E2PROM from Microchip. I find the description in the datasheet (A0 is not used) of the chip conflicts with the note AN68914 (A0 and A1 are used). I have not found the new version for AN68914. 
 
Best regards,
Lehua Chen


Re: I2C E2PROM

RSKV posted on 16 Jul 2012 04:43 AM PST
Cypress Employee
655 Forum Posts

 Right. As per the EEPROM data sheet A1 and A2 are used to address them.

Author of that application note might not have looked at this EEPROM from Microchip. If I remember correctly they had used the 24AA1025/24LC1025/24FC1025. I will initiate for a change in the application note.

In your application, you should be using A1 and A2.

I am just curious to know few things regarding your application requirement.

What is the size of the .img file.

Are you using the FX3 DVK. I am asking this because it has provision to connect only a single EEPROM. Also if you are using the DVK then you need to take care of the jumpers J42 and J45 (should be connected between 1 and 2).

Regards,

sai kirshna.



Re: I2C E2PROM

clh23047 posted on 16 Jul 2012 05:01 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

Thank you for your reply. The size of my .img file is 148KB, so I tried to use two 24FC1026 chips.  The jumpers J42 and J45 are correctly connected. I measured the voltages on the pins of the two E2PROM. The one on the DVK board is (A0=NC; A1=0; A2=0). The extensive E2PROM is (A0=NC; A1=1; A2=0).
 
Thanks,
Lehua Chen


Re: I2C E2PROM

RSKV posted on 16 Jul 2012 06:55 AM PST
Cypress Employee
655 Forum Posts

Hi Lehua Chen,

You need to build the elf2img.exe (check in the installation path; in my case: C:\Cypress\FX3 SDK\util\elf2img) by changing the "i2cConf" to "0x2E". Basically the default elf2img.exe is generated for a EEPROM that runs at 100KHz. In our case it is 1MHz. So we need to change that parameter.

Regards,

sai krishna.



Re: I2C E2PROM

RSKV posted on 16 Jul 2012 06:59 AM PST
Cypress Employee
655 Forum Posts

After doing the above mentioned task, then again you need to build the .img file using Eclipse IDE.

The newly generated elf2img.exe should be in the path: ${FX3_INSTALL_PATH}\util\elf2img\elf2img.exe.

Please let me know if I am not clear to you.

Regards,

sai krishna.



Re: I2C E2PROM

clh23047 posted on 16 Jul 2012 08:33 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

I appreciate for your reply. I changed "i2cConf" in the elf2img.c from "0x0E"to "0x2E". Does it mean I have built the new elf2img.exe? When I double clicked the elf2img.exe, there is a flash but no window showed up. Then I built the .img file using Eclipse IDE again, the programming of I2C E2PROM still failed. The update date for the elf2img.exe was 29,12,2011, so it seems I did not success in generating a new elf2img.exe.
 
Thanks a lot,
Lehua Chen


Re: I2C E2PROM

RSKV posted on 16 Jul 2012 08:36 PM PST
Cypress Employee
655 Forum Posts

OK. Do one thing.

Copy the .elf file to the folder where elf2img.exe is present.

Open a command prompt (Start --> Run --> cmd). Go to the elf2img folder (in my case: C:\Cypress\FX3 SDK\util\elf2img) in the command prompt. Then give the following command:

elf2img.exe -i USBBulkLoopAutoEnum.elf -o USBBulkLoopAutoEnum.img 0x2E 0xB0 -vectorload yes

Here I am assuming the name of the .elf file as USBBulkLoopAutoEnum.elf. In your case it might be a different one.

After running the above mentioned command it will output a .img file. Use that .img file to program the EEPROM.

Regards,

sai krishna.



Re: I2C E2PROM

RSKV posted on 16 Jul 2012 08:45 PM PST
Cypress Employee
655 Forum Posts

Also there is a readme.txt in the elf2img folder. Please refer to that for more details.

Regards,

sai krishna.



Re: I2C E2PROM

clh23047 posted on 17 Jul 2012 12:44 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

Thank you for your detailed reply.
I built the .img file with the elf2img.exe as suggested by you. When I download the new .img file to the RAM, it runs well. But when I tried to download it to the E2PROM, it fails again. You said your company tried 24AA1025/24LC1025/24FC1025, I am afraid that 24FC1026 is not applicable.
Thank you very much
Lehua Chen  


Re: I2C E2PROM

clh23047 posted on 17 Jul 2012 01:38 AM PST
Top Contributor
65 Forum Posts

When I downloaded the new or old .img file to the E2PROM, I could find the clock signal SCL (both are 100KHz) and the SDA signal. The voltages on write protect WP and Chip Address (A1, A2) are correct.

Thanks,
Lehua Chen


Re: I2C E2PROM

RSKV posted on 17 Jul 2012 04:06 AM PST
Cypress Employee
655 Forum Posts

Hi,

I have a 24FC1025 EEPROM at my end. I tried programming it with default i2cConf and also with modified i2cConf. It is getting successfully programmed with both of the images.

Let us try the following thing at your end. Just use a single EEPROM and try to program it with the images that I am attaching here. If we get successful then we can confirm board settings are fine. I am attaching the snap shot of my DVK as reference. Keep the same switch and jumper settings. Mainly SW25, SW40, J96, J97, J98, J42, and J45. SW40 might be different for you (OFF, ON, ON, OFF). Check whether the device is enumerating or not after you programmed it even though you get a failure message. We are observing this behaviour with some host controllers.

Thanks,

sai krishna.



Re: I2C E2PROM

RSKV posted on 17 Jul 2012 04:07 AM PST
Cypress Employee
655 Forum Posts

Image files



Re: I2C E2PROM

clh23047 posted on 17 Jul 2012 04:57 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

Thank you for your kind help.
I did exactly as you said: SW25 (OFF, OFF, OFF, OFF), SW40 (OFF, ON, ON, OFF), J96(no jumper), J97(2,3 connected), J98 (no jumper), J42(1,2 connected) and J45 (1,2 connected). Only one 24FC1026 chip is used on the board. I download the .img file from you into the E2PROM, the result is the same. The ‘Cypress USB BootProgrammer’ appears in Control Center but the programming of I2C E2PROM fails.
Thank you very much

Lehua Chen



Re: I2C E2PROM

RSKV posted on 17 Jul 2012 05:02 AM PST
Cypress Employee
655 Forum Posts

Have you tried with the both image files?.

Also check whether the device enumerates after programming by giving the hard reset or by power cycling, even though it shows the fail message. Sometimes it is showing the failure message even if the EEPROM is programmed correctly.

Regards,

sai krishna.



Re: I2C E2PROM

clh23047 posted on 18 Jul 2012 09:23 AM PST
Top Contributor
65 Forum Posts

 

Hello, sai krishna,
 
After I downloaded the firmware to the E2PROM, programming failed. Then I powered on again (the reset button does not function any more), the device did not enumerate ( showing USB Bootloader).
I am afraid that my evaluation board is broken somehow. When I plug the USB connector to the PC, the USB Bootloader appears. Without downloading anything to the RAM or E2PROM, there is no reaction after I press the Reset button.
 
Thanks a lot,
Lehua Chen


Re: I2C E2PROM

clh23047 posted on 31 Jul 2012 08:16 AM PST
Top Contributor
65 Forum Posts

Hello, sai krishna,

I am afraid the FC24FC1026 is not supported by the DVK board. I tried the same program and the same setting with FC24FC1025 and FC24LC1025 (only SW40 is different), they are working fine. Unfortunately, our FPGA board containing FC24FC1026 is produced. I find the pin arrangement of 24C1024 from Atmel is the same as the pins of FC24FC1026. As the next step, I will try to replace the FC24FC1026 with AT24C1024B-PU25. I hope it will work.
Best regards,

Lehua Chen



Re: I2C E2PROM

Gayathri posted on 24 Aug 2012 06:27 AM PST
Cypress Employee
327 Forum Posts

 Hi,

 

The addressing for Microchip 24LC1026 happens to be similar to that for Atmel 128kB EEPROMS. So, as in the AN 'FX3 I2C Boot Options' (http://www.cypress.com/?rID=52340), in the bootimage format choose the setting for Atmel 128kB EEPROM.

i.e. in the byte 'bImageCtl', set Bit3:1 (I2C size) as '6' corresponding to Atmel 128kB EEPROM.

This solved the issue. With this boot image format, we are able to program and boot from 24LC1026 successfully.
 

 

Regards,

Gayathri



Re: I2C E2PROM

Kavya posted on 06 Nov 2012 05:11 AM PST
Senior Member
11 Forum Posts

 Hi,

I tried to load the FX3BootAppGcc.img file onto the EEPROM. Control centre says that the programming was successful but the device is not enumerating after this. I gave the path to the inf file for installation but it says installation was unsuccessful. 

What could be the problem? The PID after the programming has changed to 1005. should I make any changes in the connection of the jumpers?

Earlier I tried to load USBBulkLoopAuto.img file and programming failed. What is the difference between the 2 img files except for the size?

Regards,

Kavya



Re: I2C E2PROM

Gayathri posted on 07 Nov 2012 05:47 AM PST
Cypress Employee
327 Forum Posts

 Kavya,

 

Which EEPROM are you using? 

 

Regards,

Gayathri



Re: I2C E2PROM

Kavya posted on 07 Nov 2012 06:09 AM PST
Senior Member
11 Forum Posts

 Gayatri,

I am using AT24C1024B I2C EEPROM. I added the new VID and PID in the inf file and enumerated the device. It gets enumerated successfully. I am using the I2C to USB fallback mode now. However when I set the PMODE pins to I2C mode(1FF) only, the device does not get enumerated( and gives a PID of 0053). In my understanding once the EEPROM is loaded with the correcct image format and enumerated it should give the same VID/PID for both modes. Have I understood it correctly?  Does this mean that the enumeration is somehow going back to USB boot and not I2C EEPROM boot?

Another problem with it is that when I use the USB boot mode only, with PMODE as F11(and the SW40 as off,on,on,off) it still enumerates with the VID/PID that I intended to store in the EEPROM. However it does not get recognized at all on the system when I change the SW40 to off,off,off,off. Am I getting something fundamentally wrong here? I understood that the USB's VID/PID  should be enumerated and not the EEPROMs. What have I done worng?  

How can I earse the EEPROM so that I can load a new image onto it?



Re: I2C E2PROM

Kavya posted on 07 Nov 2012 06:09 AM PST
Senior Member
11 Forum Posts

 Gayatri,

I am using AT24C1024B I2C EEPROM. I added the new VID and PID in the inf file and enumerated the device. It gets enumerated successfully. I am using the I2C to USB fallback mode now. However when I set the PMODE pins to I2C mode(1FF) only, the device does not get enumerated( and gives a PID of 0053). In my understanding once the EEPROM is loaded with the correcct image format and enumerated it should give the same VID/PID for both modes. Have I understood it correctly?  Does this mean that the enumeration is somehow going back to USB boot and not I2C EEPROM boot?

Another problem with it is that when I use the USB boot mode only, with PMODE as F11(and the SW40 as off,on,on,off) it still enumerates with the VID/PID that I intended to store in the EEPROM. However it does not get recognized at all on the system when I change the SW40 to off,off,off,off. Am I getting something fundamentally wrong here? I understood that the USB's VID/PID  should be enumerated and not the EEPROMs. What have I done worng?  

How can I earse the EEPROM so that I can load a new image onto it?

Thanks & Regards,

Kavya



Re: I2C E2PROM

RSKV posted on 07 Nov 2012 09:12 PM PST
Cypress Employee
655 Forum Posts

http://www.cypress.com/?app=forum&id=167&rID=71595






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.