3 Replies Latest reply on Feb 22, 2019 5:46 AM by xumec_3997051

    emmc boot failure on CYUSB2024

    xumec_3997051

      hello everyone,

        I have a boot issue on cyusb2024. After program the example FX3SMassStorage.img to chip , cyusb2024 boot failed and run to usb boot mode (as a Cypress Bay USB Boot Device).

        My PMODE[2:0] is 0b000

       

      here is my programming log:

      ------------------------------------------------------------------------------------------------------------------

      D:\Workspace\cyfwstorprog>cyfwstorprog.exe -vid:04B4 -pid:00b0 -img:FX3SMassStorage.img -bootp:boot1 -sleep:5

       

       

      MSG: Parameter Settings:

      MSG: VID: 0x04b4

      MSG: PID: 0x00b0

      MSG: Boot Image to be written: FX3SMassStorage.img

      MSG: Partition Location to write Boot Image: Boot1 Location

      MSG: Number of User Area Partitions Requested: 1

      MSG: Sleep duration for Storage Programming firmware download set to 5 seconds.

       

       

      MSG: Acquiring device and downloading programming firmware...

      MSG: Fetching Device Partition Information...Done.

      MSG: Device Partiton information:

      Media Type =   MMC

      Partition Details:

      Number   Type               Location             Size

      0        Data Area        Boot1 Location        8192 blocks

      1        Data Area        Boot2 Location        8192 blocks

      2        Data Area        User  Location        61071360 blocks

      3        Data Area        User  Location        61071296 blocks

       

       

      MSG: Deleting Existing Partitions in the User area...Done.

      MSG: Device Partiton information:

      Media Type =   MMC

      Partition Details:

      Number   Type               Location             Size

      0        Data Area        Boot1 Location        8192 blocks

      1        Data Area        Boot2 Location        8192 blocks

      2        Data Area        User  Location        122142720 blocks

       

       

      MSG: Creating partitions on the Device...Done.

      MSG: Device Partiton information:

      Media Type =   MMC

      Partition Details:

      Number   Type               Location             Size

      0        Data Area        Boot1 Location        8192 blocks

      1        Data Area        Boot2 Location        8192 blocks

      2        Data Area        User  Location        122142720 blocks

       

       

      MSG: Setting active partition for Boot firmware download...Done.

      MSG: Programming primary firmware image...Done.

      MSG: Enabling boot partition...Done.

       

       

      SUCCESS: Programmed Image "FX3SMassStorage.img" to Partition 0 in the Boot1 Location

      SUCCESS: Reset device(with PMode[2:0] set to 0) to boot programmed firmware

      FIN: Application Exiting.

      ------------------------------------------------------------------------------------------------------------------

       

      after that I replugin device and regconized as Cypress Bay USB Boot Device.

      Obviously chip boot from emmc failed and jump to usb boot program

       

      and I also make a try ------>

      rename CyStorBootWriter.img to CyStorBootWriter.img.bak

      copy FX3SMassStorage.img to CyStorBootWriter.img

      and do a program by cyfwstorprog

       

      amazing, device run FX3SMassStorage.img successfully,it regconized as a mass storage

      and partition as two 29.2GB luns (My EMMC is 64GB)

       

       

      ,

      so my issue is why my device can't boot from emmc use PMODE=000 setting?

      which step is wrong? how to debug?

       

      EMMC VCCQ is 1.8V, Toshiba 64GB eMMC, THGBMHG9C4LBAIR

        • 1. Re: emmc boot failure on CYUSB2024
          xumec_3997051

          fixed by patch ext csd 0xB3 to 0x48

          • 2. Re: emmc boot failure on CYUSB2024
            KandlaguntaR_36

            Can you please explain how did you fix the issue briefly so that it will be useful for other users?

            • 3. Re: emmc boot failure on CYUSB2024
              xumec_3997051

              actually ext csd 179 is not set to 0x8 cause this problem

              it's cystorbootwriter's bug

              I comment following code in cystorageboot:

               

              case CY_FX3S_SCSI_DELETE_PARTITIONS:

              ....

               

                              /*

                              if ( (status == CY_U3P_SUCCESS) && (glDevInfo.cardType == CY_U3P_SIB_DEV_MMC))

                              {

                                 status = CyU3PSibSendSwitchCommand(0, 0x03B30000 , 0);

                                 CyU3PDebugPrint (3,"\n\r Reset the EXT_CSD" );

                              }

                              if((status == CY_U3P_SUCCESS))

                              {

                                  CyFxMscApplnQueryDevStatus();

                                  SendPartitionData(lun);

                              }

                              else 

                              {

                                  glMscCmdStatus  = 1;

                                  glSensePtr[lun] = CY_FX_MSC_SENSE_CRC_ERROR;

                                  CyU3PEventSet (&glMscAppEvent, CY_FX_MSC_SIBCB_EVENT_FLAG, CYU3P_EVENT_OR);

                              }

                              */

               

              just do this, problem solved.

              but I can't explain why cuz i dont know why.