1 2 3 Previous Next 36 Replies Latest reply on Jun 29, 2020 11:41 PM by hola_4724651

    fx3 cannot boot from s25fs128s

    hola_4724651

      Hi, there!

      I've tried demo of <1.3\firmware\serialif_examples\cyfxusbspiregmode> with pmode[2:0]=z11 and download img to spi flash by "usb control center". it looks like programming very fast and shows "succeeded". however, with pmode[2:0]=0z1 , reset the board and usb control center shows BcdUSB = 02 00.

      does anyone can tell me which part of code should i modify and/or show me a demo uboot img for s25fs128s? thanks.

        • 1. Re: fx3 cannot boot from s25fs128s
          JayakrishnaT_76

          Hello,

           

          Please let me know the following details:

          1. Are you able to download the firmware image to RAM and enumerate the device properly?

          2. According to my understanding, when you try to download the firmware to flash, the firmware download is proper but the boot from flash is failing and the device re-enumerates as USB Bootloader Device. Please correct me if Iam wrong.

          3. Please probe the PMODE[2:0] lines when you set it to 0z1 and verify if it is the same or not.

           

          When the you set the PMODE[2:0] as z11 and use control center to download the image to flash, the flash is updated with the new firmware image. Now, when the PMODE[2:0] is changed to 0z1, the bootloader looks for the image in flash. If the boot fails, then the device will re-enumerate as USB Bootloader device.

           

          Best Regards,

          Jayakrishna

          • 2. Re: fx3 cannot boot from s25fs128s
            hola_4724651

            thanks for replying~

             

            1, yes, it works ok by downloading img to ram and enumerating the device usb3.0;

            2, yes, it shows that downloading to spi flash was succeed, but after reset, the board boots from flash failing;

            3, i am quit sure i have changed pmode to 0z1 and then reseted the board.

             

            by the way, last night i tried another device w25q32fw with the same steps and it works ok.

            • 3. Re: fx3 cannot boot from s25fs128s
              hola_4724651

              and maybe i need to stress that here we use 1.8v spi flash device.

              • 4. Re: fx3 cannot boot from s25fs128s
                JayakrishnaT_76

                Hello,

                 

                Please confirm that you used the device w25q32fw by replacing s25fs128s on the same board. This is to understand that the PMODE was proper as you confirmed that everything works fine with w25q32fw.

                In addition to this, please let me know if any other SPI devices are connected to FX3.

                 

                Also, please try the following test:

                1. Use the flash s25fs128s on your device,

                2. Download the firmware to flash using control center.

                3. Now do not change the PMODE setting to 0z1. Instead, load the firmware cyfxflashprog to RAM. This project comes along FX3 SDK and can be found in the following location:

                C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog

                4. Refer to the readme file of this project which includes a vendor command to read data from the flash (0xC3).

                5. Use this vendor command and read back the contents of the flash.

                6. Compare the data that is read back and let me know if there are any changes between the data written to flash and data read back from the flash.

                 

                Best Regards,

                Jayakrishna

                • 5. Re: fx3 cannot boot from s25fs128s
                  hola_4724651

                  yes,  replacing the device  taked place on the same board and there is no another spi device connecting to fx3.

                   

                  using s25fs128s as spi flash and keeping pmod = 0z1, after downloading the firmware to flash, control center rejects action of download to ram, noticing "please reset your device to download the firmware"

                  • 6. Re: fx3 cannot boot from s25fs128s
                    JayakrishnaT_76

                    Hello,

                     

                    Sorry for not being clear in my previous response. Please find the detailed response below:

                    1. Use the flash s25fs128s on your device. Keep the PMODE setting as z11.

                    2. Download the test firmware to flash using control center.

                    3. Now, keep PMODE setting as z11 itself (do not change the PMODE setting to 0z1). Load the firmware cyfxflashprog to RAM. This project comes along FX3 SDK and can be found in the following location:

                    C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog

                    4. Refer to the readme file of this project which includes a vendor command to read data from the flash (0xC3).

                    5. Use this vendor command and read back the contents of the flash.

                    6. Compare the data that is read back and let me know if there are any changes between the data written to flash and data read back from the flash.

                     

                    Please let me know if you still face any issues.

                     

                    Best Regards,

                    Jayakrishna

                    • 7. Re: fx3 cannot boot from s25fs128s
                      hola_4724651

                      soryy, upstare there shoud be z11, i meant

                       

                       

                      using s25fs128s as spi flash and keeping pmod =z11, after downloading the firmware to flash, control center rejects action of download to ram, noticing "please reset your device to download the firmware"

                      • 8. Re: fx3 cannot boot from s25fs128s
                        JayakrishnaT_76

                        Hello,

                         

                        After step 2 of my previous response, reset the device once. Then the device will re-enumerate as USB Bootloader device. After this continue the remaining steps.

                         

                        Best Regards,

                        Jayakrishna

                        • 9. Re: fx3 cannot boot from s25fs128s
                          hola_4724651

                          thanks for info.

                          yet on windows10 os, i'm not sure how to use command to read back contents. there is no debug port on board

                          • 10. Re: fx3 cannot boot from s25fs128s
                            JayakrishnaT_76

                            Hello,

                             

                            After step 3 mentioned in my response 4, the device enumerates as USB Bootprogrammer Device in control center. Now you can use vendor commands to read the contents of flash (this firmware has implemented this feature).

                            Please refer to the following snapshot:

                            Expand the device tree in control center and choose Control Endpoint. Now set the different settings as shown in the snapshot. If you hit on Transfer Data, then you can see the data read back from flash as shown in the snapshot. Another option is to select Transfer File which saves the data read into a file. This file can be viewed by using Hex Editor.

                            Please keep the Bytes to transfer field as a multiple of 256 and less than or equal to 4096.

                            The page size of the flash is assumed to be 256 bytes and byte address is computed by multiplying wIndex by 256.

                             

                            By changing the Bytes to Transfer and wIndex field, you can read the contents of the flash completely. Please try this and compare with your firmware image and let me know if they are different or same.

                             

                            Best Regards,

                            Jayakrishna

                            • 11. Re: fx3 cannot boot from s25fs128s
                              hola_4724651

                              yes, they are different! as showing, left one is readout from flash and right on is img of <cyfxusbspiregmode>.

                              the first difference appears at position of 10h*c, there should be 2c but 24 instead.

                              how it happens?

                               

                              • 12. Re: fx3 cannot boot from s25fs128s
                                hola_4724651

                                i just wonder if it is because of special section of s25fs-l for high density and want to know how to deal with it. thanks.

                                • 13. Re: fx3 cannot boot from s25fs128s
                                  JayakrishnaT_76

                                  Hello,

                                   

                                  Please try the test that I mentioned in my response 6 multiple times and let me know if the error is happening again and at the same locations.

                                   

                                  If it is happening again, please try the following test:

                                  1. Do not program the flash using control center.

                                  2. Erase the flash content by using the vendor command 0xC4 and the settings shown in the following snapshot:

                                   

                                   

                                  3. Now use the vendor command 0xC4 again with the following settings to check if the erase is complete or not.

                                   

                                   

                                   

                                  The data should be 00 as shown in the snapshot if it is success.

                                   

                                  You can try to read back the contents of flash once to verify if the erase was successful. Please share a snapshot of the same.

                                   

                                  4. After this, write some data to flash using the vendor command 0xC2. In the Data to send field, use incremental data so that it will be easy to test. The bytes to transfer field will be automatically changed based on the data that you enter in the data to send field. Please refer to the following snapshot for the other settings.

                                   

                                  5. Now read back the contents of flash by using the vendor command 0xC3. The settings is shown in the following snapshot.

                                   

                                  Please use the direction field as mentioned in the snapshots. If that is not correct, then the transfers will fail. Please try this and let me know if the received data is incremental or not.

                                   

                                  Best Regards,

                                  Jayakrishna

                                  • 14. Re: fx3 cannot boot from s25fs128s
                                    hola_4724651

                                    more agin, the data readout are different from the ones writein.

                                    1 2 3 Previous Next