1 2 Previous Next 24 Replies Latest reply on Nov 7, 2012 11:12 PM by rama.sai.krishna.vakkantula

    I2C E2PROM

    lehua.chen

      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   
        • 1. Re: I2C E2PROM
          rama.sai.krishna.vakkantula

          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.

          • 2. Re: I2C E2PROM
            lehua.chen

            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   
            • 3. Re: I2C E2PROM
              rama.sai.krishna.vakkantula

               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.

              • 4. Re: I2C E2PROM
                lehua.chen

                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   
                • 5. Re: I2C E2PROM
                  rama.sai.krishna.vakkantula

                  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.

                  • 6. Re: I2C E2PROM
                    rama.sai.krishna.vakkantula

                    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.

                    • 7. Re: I2C E2PROM
                      lehua.chen

                      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   
                      • 8. Re: I2C E2PROM
                        rama.sai.krishna.vakkantula

                        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.

                        • 9. Re: I2C E2PROM
                          rama.sai.krishna.vakkantula

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

                             

                          Regards,

                             

                          sai krishna.

                          • 10. Re: I2C E2PROM
                            lehua.chen

                            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     
                            • 11. Re: I2C E2PROM
                              lehua.chen

                              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   
                              • 12. Re: I2C E2PROM
                                rama.sai.krishna.vakkantula

                                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.

                                • 13. Re: I2C E2PROM
                                  rama.sai.krishna.vakkantula

                                  Image files

                                  • 14. Re: I2C E2PROM
                                    lehua.chen

                                    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

                                    1 2 Previous Next