fx2lp with c0 load

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

I have a fx2lp board with eeprom connected with  A2,A1,A0(0,0,0),as cypress suggested,i am programming small eeprom with 8bytes.iic file.but programming is failed.

in our HARDWARE,FX2LP is connected to eeprom(16KBytes) through i2c buffer.is it i2c buffer is problem for this issue?

regards,

geethanjali.

0 Likes
1 Solution

Hello Geetha,

When the Program -> FX2 -> Small EEPROM is chosen from the Cypress USB Control Center, the host issues a vendor command 0xA2 to load the contents into the small EEPROM, which should be a 8-byte addressable EEPROM.

So, to overcome this, instead of issuing the vendor command 0xA2, the host should issue the vendor command 0xA9 which would load the contents into the large EEPROM, i.e 16-byte addressable EEPROM.

The modification can be done in the function block private bool LoadEpromIIC() which is part of the CyUSB.dll file. This function is present in the CyFX2Device.cs file.

Modify the below statement

ControlEndPt.ReqCode = isLargeEEprom ? (byte)0xA9 : (byte)0xA2;

to

ControlEndPt.ReqCode = 0xA9;

After performing this change, the CyUSB.dll file has to be built. This can be used along with the Control Center to perform data transfers to the 16-byte addressable EEPROM.

Best regards,

Srinath S

View solution in original post

22 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Geethanjali,

-Please make sure that there are pull up resistors on the SCL and SDA lines.

-Can you specify which EEPROM you are using?

Best Regards,

Sananya

hello sananya,

pullup resistors are there on the scl and sdata.programming through RAM is working.EEPROM used is 24LC128 ,that is large eeprom.{both large eeprom and small eeprom programming is not working,programming failed}.

programming of large EEPROM is working with another board,in this board ,eeprom is directly connected to fx2lp through I2C without any i2c buffer.

regards,

geethanjali.

0 Likes

Hello Geethanjali,

-Are you connecting any external I2C bus buffer between the FX2LP and EEPROM? The SCL, SDA lines should be directly connected to the EEPROM.

- Could you please measure the voltage on the lines?

Best Regards,

Sananya

Hello sananya,

Are you connecting any external I2C bus buffer between the FX2LP and EEPROM? The SCL, SDA lines should be directly connected to the EEPROM.

yes.we are using external i2c buffer between fx2lp and eeprom.

0 Likes

Hi,

the 24LC128 EEPROM is a 16-bit address.

For example is you use BOOL EEPROMWriteByte(BYTE addrEEPROM, BOOL TypeEEPROM,  WORD addr, BYTE value) from cypress lib

=> TypeEEPROM = 0x00 for 8 bit addr eeproms (24LC01B ou AT24C01A)

=> Other TypeEEPROM = 0x01 for 16 bit addr eeprom (24LC65 ou AT24C32A ou AT24C64A).etc...Indicate if it is a dual byte address part is 16 bit addr bit

if you programm 24LC128 with 8bytes.iic is the same.

hello sananya,

8bytes.iic file is for programming only for small eeprom?should i change 8bytes.iic file for 16bit address?

regards,

geetha.

0 Likes

yes

To compile your code to the 16-bit format si the EZ-USB® Technical Reference Manual,

chapter 3.4.3 Serial EEPROM Present, First Byte is 0xC2, page 53 to 55

The best way to understand, you can look inside the code of Hex2bix utility

Folder  .. Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.0\Utilities\Hex2Bix

This directory contains the Hex To Bix converter program for the Anchor Chips EZ-USB chip.

This file converts the hex output file to a bix file that can be

downloaded directly into target memory. It also converts the hex

output to a file that can be directly loaded into an EEPROM.

It basically creates a memory image (including zeros) of the memory

space defined by the hex file.

Program Options:

HEX2BIX [-AIBRH?] [-S symbol] [-M memsize] [-O filename] Source

    Source - Input filename

    A      - Output file in the A51 file format

    B      - Output file in the BIX file format (Default)

    H|?    - Display this help screen

    I      - Output file in the IIC file format

   M      - Maximum memory limit (Default = 8k)

    O      - Output filename

    R      - Append bootload block to release reset

    S      - Public symbol name for linking

with a sample

c:\cypress\usb\bin\hex2bix -c 0x80 -i -f 0xC2 -o bulkloop.iic bulkloop.hex.

0 Likes

HI,

I have done with fx2lp i2c booting.there is no issue with fx2lp booting.

but my problem is regarding i2c eeprom erase.when fx2lp is detected as unknown device.

0 Likes

Hello Geetha,

I assume you are programming using the Control Center? In that case you need to connect an appropriate EEPROM as per the datasheet (Table 😎 to the required address lines since a small EEPROM will be expected to have a single byte address. After a proper Small EEPROM is connected, you can load a 8 bytes .iic with C0 as the first byte and boot the corrupted FX2LP from it.

Best Regards,

Sananya

the value of A2 A1A0 address  is wrong if you use 24LC128 as boot. On the chapter 13.6  (page 192) of the EZ-USB® Technical Reference Manual, Document # 001-13670 Rev. *D

pastedImage_0.png

hello s.j

I am done with fx2lp booting.no issues regarding this.

i have a 8bytes.iic file ,in order to erase corrupted eeprom by connecting sda and scl lines.for this,i have to program this 8bytes.iic file to another eeprom.but programming is failing.

because 24lc128 eeprom is 16bytes addressing,the 8bytes,iic file given by cypress is containg c0 as first byte,how to change this 8bytes.iic file in order to programming the large eeprom?which thing i have to modify?is it 8bytes.icc or eeprom ic?

regards,

geetha.

0 Likes

Hello Geetha,

You cannot program a 16-byte addressable EEPROM using the Cypress USB Control Center Program -> FX2 - > Small EEPROM. You need to have an 8-byte addressable EEPROM or the Control Center application should be modified to implement this.

Best regards,

Srinath S

Hello shrinath,

You need to have an 8-byte addressable EEPROM or the Control Center application should be modified to implement this.

currently we dont have 8byte addressable EEPROM.

How can i modify control center application?

regards,

geetha.

0 Likes

Hello Geetha,

When the Program -> FX2 -> Small EEPROM is chosen from the Cypress USB Control Center, the host issues a vendor command 0xA2 to load the contents into the small EEPROM, which should be a 8-byte addressable EEPROM.

So, to overcome this, instead of issuing the vendor command 0xA2, the host should issue the vendor command 0xA9 which would load the contents into the large EEPROM, i.e 16-byte addressable EEPROM.

The modification can be done in the function block private bool LoadEpromIIC() which is part of the CyUSB.dll file. This function is present in the CyFX2Device.cs file.

Modify the below statement

ControlEndPt.ReqCode = isLargeEEprom ? (byte)0xA9 : (byte)0xA2;

to

ControlEndPt.ReqCode = 0xA9;

After performing this change, the CyUSB.dll file has to be built. This can be used along with the Control Center to perform data transfers to the 16-byte addressable EEPROM.

Best regards,

Srinath S

Hello Shrinath,

How can i modify Cyusb.dll ?

regards.

geetha.

0 Likes

Hello Geetha,

The CyUSB.DLL source file is present as part of the CYUSB3_USB_Suite_Source which can be obtained from the below link,

www.cypress.com/file/289981/download

Best regards,

Srinath S

Hello shrinath,

I am not able to rebuild the cyusb.dll.

can you modify and send it over here.

regards,

geetha.

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Geethanjali,

I have attached the modified CyUSB.DLL file. Kindly, use this in place of the existing DLL which is being used by the USB Control Center.

Please note that this CyUSB.DLL file is only a temporary fix that is suitable only for your issue. Please revert back to the original CyUSB.DLL after the EEPROM has been recovered.

Best regards,

Srinath S

Hello shrinath,

programming is successfull(program->fx2->small eeprom).still it is showing fx2lp with no eeprom.

thanks for your support.

can i use this board to ease another board eeprom?

regards,

geetha.8bytes.bmp

Hello Geethanjali,

- Reset the board and check if the device comes up with a new VID/PID instead of the boot-loader VID/PID.

- Yes, this EEPROM can now be used to recover the other EEPROMs. Connect the EEPROM with 8bytes onto the address 000 along with the corrupted large EEPROM. Once the FX2LP enumerates, the Control Center can be used to program the large EEPROM.

Best regards,

Srinath S

Hello shrinath,

this is the pid and vid.

regards,

geetha.vidpid.bmp

0 Likes

hello both of you,

eeprom used is 16byte addres i.e large eeprom.

the 8bytes.iic file given by cypress is conatining c0 as first byte.

eeprom 24LC128 has A2,A1,A0  as 000 i.e according to c0 load.

what should i do now?

according into c0 load,it is having 000 address,.iic file contains c0 as first byte(8byte addres) but eeprom is 16byte address.how can i erase another corrupted eeprom now?

regards,

geetha.

0 Likes