cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

xixu_4093676
New Contributor

Dear Sir,

    We are trying to use Fx3BootAppGcc load one app image (come from EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink) to RAM,

    But when cyfxbulksrcsink start up, it show the error message "CyU3PUsbStart failed to Start, Error code = 254" .

    We use the "usb Control Center "download cyfxbulksrcsink to RAM by USB.

    If boot the "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfx_rtos_example", It is OK.

    Can you please tell us what causes this issues? How to fix it?

Thanks,

Martin

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator

Hello Martin,

- CyFx3BootUartPrintMessage() API can be called in the vendor command handler. Please let me know if you have tested with the firmware and the second stage boot-loader that I shared and let me know the results. It would be nice if you could share your second stage boot-loader firmware source.

- The additional code in the USB boot is to ensure that the interrupt table portion of the FX3 memory is not written. Ideally, when the firmware image is generated by the eclipse IDE, this part of the memory is not touched upon. Hence, it is not being included in the I2C boot, but that should not make a difference for the issue.

EDIT: Please test using the boot-loader and the application firmware that I have shared and let me know if there are issues. If possible, share your firmware source files.

Best regards,

Srinath S

View solution in original post

0 Likes
6 Replies
SrinathS_16
Moderator
Moderator

Hello Martin,

The USBBulkSourceSink example firmware that comes with the FX3 SDK does not return failure on this error. Please look at the below code snippet from that example.

apiRetStatus = CyU3PUsbStart();

if (apiRetStatus == CY_U3P_ERROR_NO_REENUM_REQUIRED)

     no_renum = CyTrue;

else if (apiRetStatus != CY_U3P_SUCCESS)

{

     CyU3PDebugPrint (4, "CyU3PUsbStart failed to Start, Error code = %d\n", apiRetStatus);

     CyFxAppErrorHandler(apiRetStatus);

}

The error code 254 that you have mentioned corresponds to CY_U3P_ERROR_NO_REENUM_REQUIRED. This indicates that the USB block is already started by the boot-loader and there should be no re-enumeration happening on the device. In this case, the CyU3PConnectState() API will not be invoked by the firmware. Please let me know if you have made any changes to the default firmware that comes with the SDK.

Best regards,
Srinath S

0 Likes
xixu_4093676
New Contributor

Hi Srinath,

      I changed the first param of CyFx3BootUsbStart () to CyFalse in the bootloader(based on Fx3BootAppGcc) and the app usb can work.

      But it is only working on USB2.0 Port

      With USB3.0 port, the windows can not find our App usb camera device(still show bootloader device) when app is running, until I re-plugin the usb cable. 

     Are there one api to let usb host force Reenum the device?

     I tried to call CyU3PConnectState(CyFalse,CyTrue) and  CyU3PConnectState(CyTrue,CyTrue), But it no effect.

   

Thanks,

Martin

  

0 Likes
xixu_4093676
New Contributor

Hi Srinath,

    Are there any update on the issues?

   Actually, The sample "EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink" have updated to there you are said.

   The issues is Fx3BootAppGcc can't Boot cyfxbulksrcsink by usb when connect to USB3.0 Port.

   But it work when connect to USB2.0 Port.

Thanks,

Martin

0 Likes
SrinathS_16
Moderator
Moderator

Hello Martin,

- I have modified the Fx3BootAppGcc firmware such that the first parameter of the CyFx3BootUsbStart() API is CyFalse. This would force re-enumeration on the main firmware that is loaded. I am able to see the re-enumeration happening on both USB2.0 as well as USB3.0 ports.

- Can you please capture the UART logs during the enumeration of the device and share the same?

I have also attached the Fx3BootAppGcc firmware and the USBBulkSourceSink firmware images. Please check using these so that the test firmware at both ends are the same.

Best regards,

Srinath S

0 Likes
xixu_4093676
New Contributor

Hi Srinath,

      Sorry for my delay on provide the update.

     In my Bootloader, I call the CyFx3BootUartPrintMessage to output debug message in the function myVendorCmdHandler.

      I figure out the issues is related with  CyFx3BootUartPrintMessage.

      Just a confirm, Can we call the CyFx3BootUartPrintMessage in the myVendorCmdHandler?

      Also, With our bootloader, it enable usb and wait some control cmd for 3 second, if don't get any control cmd, it will try to boot app from eeprom.

    We still see the issues, boot ok only under usb2.0, failure under usb3.0.

    I have modified the Fx3BootAppGcc firmware such that the first parameter of the CyFx3BootUsbStart() API is CyFalse.

Also, I also find out some difference on the usb boot and i2c boot  boot logic.

   in the usb_boot.c I  can see the following code on copy the code image to memory:

   myVendorCmdHandler()

{

......

/* Validate ITCM Memory */

            if ((address + gEP0.wLen) <= CY_FX3_BOOT_ITCM_END)

            {

                /* Avoid writing to the interrupt table. */

                if (address < 0xFF) {

                    gEP0.pData += 0xFF-address;

                    gEP0.wLen -= 0xFF-address;

                    address = 0xFF;

                }

                CyFx3BootMemCopy((uint8_t *)address, gEP0.pData, gEP0.wLen);

            }

......

}

But I don't see similar code logic in the LoadFwSection function.

Is It possible that my issues is related with those code?

Thanks,

Martin

0 Likes
SrinathS_16
Moderator
Moderator

Hello Martin,

- CyFx3BootUartPrintMessage() API can be called in the vendor command handler. Please let me know if you have tested with the firmware and the second stage boot-loader that I shared and let me know the results. It would be nice if you could share your second stage boot-loader firmware source.

- The additional code in the USB boot is to ensure that the interrupt table portion of the FX3 memory is not written. Ideally, when the firmware image is generated by the eclipse IDE, this part of the memory is not touched upon. Hence, it is not being included in the I2C boot, but that should not make a difference for the issue.

EDIT: Please test using the boot-loader and the application firmware that I have shared and let me know if there are issues. If possible, share your firmware source files.

Best regards,

Srinath S

View solution in original post

0 Likes