I am using the FX3 DVK board with atmel's i2c eeprom AT24C1024B. I am using control centre to program the eeprom. My switch SW40 is off, on,on,off. all jumpers are correctly placed.
However when I try to load the USBBulkLoopAuto .img file I always get the error message : programming the I2C EEPROM failed.
I have followed everything that is there in the documents and still I have the same problem.
This is the first time I am using this board and I was not able follow the elf2img thread. I need help with programming the EEPROM.
Should I change anything in the USBBulkLoopAuto example before I generate the .img file?
Should I change any other connections or any other information?
you should configure your PMODE pins to
|float||1||float||I2C, On Failure, USB Boot is enabled|
Then the I2C device address should be 0xA0 I think. So the switch SW40 should hold all lines to ground. Read the application note from cypress (AN68914 I2C Boot Option).
The PMODE configuration is described in the data sheet of FX3.
You also have to change the post build step to create a .img file which contains the correct boot informations. See AN68814...
go to the Table 5 and choose the correct settings for the elf2img converter for
I had made the correct PMODE settings before I loaded the FX3BootAppGcc.img file onto the EEPROM without any change in the file( and the programmign was successful). I think I made a mistake by not following any post build steps or changing the descriptors for the EEPROM. Now my device is not enumerating and an unknown device with a PID of 1005 is detected.
What can I do to erase the EEPROM now that my PC is not recognizing the device at all? I hope you can help me as soon as possible.
Why was the EEPROM programmed for a smaller img file(27KB) and not for 121KB img file even though max size is 128KB?
Thanks & Regards,
Just to add to the problem even if I use the USB boot mode instead of the I2C=>USB fallback mode , the device is still not enumerating. What could be the reason for this? Would really appreciate your help.
Thanks & regards,
I added th pid and vid of the device and now it is enumerating on the PC. But I would like to erase the EEPROM and load a different image onto the eeprom. What should I do? I tried to write to the EEPROM from control endpoint on contro center and it says : CONTROL OUT trasnfer completed, but there is no change in the eeprom as such. What should I do to erase the EEPROM and how can I load a larger image onto it?
Thanks & regards,
In order to replace the contents of teh EEPROM with a new one you just need to program it again using Control Center. No need to erase it.
Since AT24C1024B (128KB atmel ) EEPROM, the bit3:1 in third byte (bImageCtl field) of image should be equal to '6' corresponding to 128kb ATMEL EEPROM. So, the boot image firts 4 bytes should be as follows:
'43 59 0C B0' for 100kHz I2C speed
'43 59 1C B0' for 400kHz I2C speed
'43 59 2C B0' for 1MHz I2C speed
Open your img file in any of the hex editors and modify the third byte (bImageCtl field) values mentioned above, as per your I2C speed requirement. Check using this if this solves the issue.
I was successfully able to reprogram the EEPROM with USBBulkLoopExample.I also got to transfer data in and out of the Bulk endpoints.
1) However I still have the problem of PMODE pin settings as I described earlier. 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?
Please probe the PMODE pins (specifically mentioning center pins in J98, J97, J96 in order) using a Multimeter and ensure that the PMODE settings are as expected.