FX3 Bulkloop example: unexpected warm reset sent by host with some host controler after some time

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
padoc_3859456
Level 1
Level 1

Hello

Following the recent discussion (ended Sept 7th) with Yves on this topic, the only solution we have to avoid this issue is to disable the LPM function.

But disabling the LPM fails the USB compliance test. And unfortunately this is an issue for some of our customers.

Additionally it appears that this solution does not work with the Renesas USB3 controller present on a DELL T5600.

Please advise on another solution.

Thank you

Pascal

0 Likes
20 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hello Pascal,

In the firmware, when do you add LPMDisable?

Regards,

Hemanth

Hemanth
0 Likes

Hello Hemanth

Actually we use your application to disable the LPM.

CyFxBulkLoopApplication::CyFxBulkLpApplnUSBEventCB (

switch (evtype)

case CY_U3P_USB_EVENT_SETCONF:

/* Disable the low power entry to optimize USB throughput */

CyU3PUsbLPMDisable();       <= HERE

Thank you

Pascal

0 Likes

Hi Pascal,

Previous thread:

https://community.cypress.com/thread/36374

As mentioned in the last comment in the above thread, if you call CyU3PUsbLPMDisable() when SET_CONF is received, then USB Compliance test will fail.

So, can you please refer to source code of AN75779

In the source code, you will see that CyU3PUsbLPMDisable() is called in CyFxUvcApplnStart() and this is called only video streaming starts.

Please let me know if you have any questions.

Regards,

Hemanth

Hemanth
0 Likes

Hello Hemanth

I think we don’t understand each other:

With some type of host controller (for example: Renesas USB 3.0 eXtensible Host
Controler)
we face some issue
in our camera using FX3 while doing basic bulk out write in loop on control
endpoint 0 => After a while, the Host (PC Win10 v1803 64bit) sends a warm
reset which makes camera to reenumerate, and an unplug event is sent to the PC
application.

With USB3 analyzer, we saw some errors with flow control between FX3 and Host
Controler which make the PC to generate a warm reset.

In order to find the root cause we tried to reproduce the issue with EZ-USB FX3
development board and the Bulkloop example Firmware & software
(Cypress USB suite v1.3.4) without any modifications. We know that in this this
example LPM is disabled in the FW, and we are agree it is not USB compliant,
but our interest for now is just to check if our issue still occurs or not. Of
course in our final FW we will manage correctly LPM.

So Tests Results:

With Bulkloop example Firmware (unmodified code,  so with LPM disabled) =>
The warm reset issue is solved  but only for some Host Controlers Renesas.

With Bulkloop example Firmware (we modify code to remove CyU3PUsbLPMDisable,  so LPM is
always enable) => The warm reset issue occurs with every  Host
Controlers Renesas.

  • Finally managing
    LPM seems not to be the solution

One more time, we are only interested in solving our issue, as it seems to be
linked to flow control between FX3 and Host Controler, we don’t know how to
solve it in the FW.

We think that if we can solve the issue with EZ-USB FX3 development board and the
Bulkloop example Firmware, we will also solve it in our camera, and moreover it
will more easy for you to reproduce it on your side. And of course we want to
be USB compliant.

So do you think it is the good way to proceed or  do you think we should
follow another track ?

Thank you

Pascal

0 Likes

Hi Pascal,

- You have mentioned that - ' By using unmodified SDK 1.3.4 Bulkloop example - where LPM is disabled - the issue is still present in few Renesas Host Controller'

We need to understand why the issue occurs when LPM is disabled.

- So, can you provide 2 USB traces under following conditions:

a. Use unmodified SDK 1.3.4 Bulkloop example with the Host controller where you see the issue.

b. Remove DisableLPM in SDK 1.3.4 Bulkloop example and test with the same Host Controller.

Please provide both the above traces and also the PC information where you do the above test.

Regards,

Hemanth 

Hemanth
0 Likes

Hi Hemanth

We will provide you the 2 USB traces but it will take a few days just because another problem with our setup.

Please don't close this case.

Thank you

Pascal

0 Likes

Hi,

We succeeded to reproduce the issue with the EZ-USB FX3 development board and the BulkloopAuto Cypress examples (Firmware & software) using Cypress USB suite v1.3.4.

As already said, in you FW example if we run it without modification, we don’t see the issue, but if we comment “CyU3PUsbLPMDisable();” the issue occurred => we got
a warm reset when we look with a USB analyser.      

CyFxBulkLoopApplication::CyFxBulkLpApplnUSBEventCB()

switch (evtype)

case CY_U3P_USB_EVENT_SETCONF:

/* Disable the low power entry to optimize
USB throughput */

CyU3PUsbLPMDisable();      <=HERE

But, if you remove "CyU3PUsbLPMDisable()" there is still the issue.

Once again, our intention is not to disable LPM as it is not anymore USB compliant,  it is just the only way we succeed to reproduce the issue we have in our camera, with Cypress board and softwares.

In attachments, I put:

  • USB Analyser trace with LPM disable and no issue (BulkLoop_LPM_Disable_No_Issue.usb) => it corresponds to your case a)
  • USB Analyser traces (BulkLoop_WarmReset_Packet_11041272.usb)   The USB analyser used is : Teledyne Lecroy Analyser USB protocol Suite Suite (USB Protocol Analyser 7.65)   it corresponds to your case b)
    The war reset occurs at packet 11011272
  • The full configuration (BulkLoop_WarmReset.HTM  &  Renesas_XHCI_USB3_HostControler.png)  of the PC on which the issue occured :  (Win10 64bit 1803,  with external Renesas PCIe USB3 card)
  • A screen shot of the test :  BulkLoop_WarmReset_Packet_11041272.png

    When issue occurs,  the C++ application stops and we see a remuneration of the device in the Control Center
  • A screen shot of the Bulkloop auto project (BulkLoopAuto.png)

Best regards

0 Likes

Hi Pascal,

From the above trace (BulkLoop_WarmReset_Packet_11041272.usb) we see that the Host behaves abnormally. Please see the attached document for more details and work around for the same.

Regards,

Hemanth.

Hemanth
0 Likes

Hi Hemanth

We will implement the LPM according to your recommendation.

But we still have sometimes the warm reset issue on a test where LPM is permanently disabled.

The configuration is Win7 and USB3 Intel chipset.

Thank you

Pascal

0 Likes

Hi Pascal,

I note that - "

But we still have sometimes the warm reset issue on a test where LPM is permanently disabled.

The configuration is Win7 and USB3 Intel chipset."

The traces that you have shared doesn't show this case. Can you please share the USB trace where you can see the same.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Here is how to reproduce the warm reset issue on a test where LPM is permanently disabled:

-The hardware tested is your EZ-USB FX3 development board (which is externaly powered)

-The PC configuration is DELL TowerT5810 with Win10 1803 64bit with chipset Intel USB3  (full PC configuration can be found in attached PC_DELL_TowerT5810__Win10_1803_x64.HTM)

-Starting from you Cypress USB suite v1.3.4, we modified both the FW "USBBulkLoopAuto" (LPM is disabled)  and the PC application "bulkloop"

-The modification consist in just doing Write & Read operation in loop on control endpoint 0

-Procedure to reproduce the issue:

In attached file, you can find in folder "e2v_ModifiedCode" the modified souce code  (and in folder "Cypress_OriginalCode_SDK_1.3.4" your original source code, in case you want to compare them)

1) We download the FW "USBBulkLoopAuto" to RAM with the USB Control Center (see USBControlCenter_BeforeStartingApplication.png)

2) We start the PC bulkloop.exe  (64bit), then we click on Start button

3) At one time we see the issue  (see Octoplus_FwCypressBulLoopError1.PNG) and we see a USB event unplug/plug

     in control center device is reenumerated:  (see USBControlCenter_BeforeStartingApplication.png) 


Regards

Yves






0 Likes

Hi Yves,

I have seen the attachment. I understand what you are doing.

Is it possible for you to share the USB trace when the failure occurs?

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Unfortunately, our USB analyser does not have the adequate buffer depth to memorize all the traces, so we have to manually restart it so it is very difficult. Can you reproduce the issue on your side ?

Regards

Yves

0 Likes

Hi Yves,

We do not have the PC with that configuration.

What can be done is: Analyzer can be made to save 50% pre-trigger and 50% post-trigger, where the trigger condition is LFPS WARM reset.

Please let me know if it is possible for you to do the same. You can let me know for any questions in doing the same.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hermanth,

I succeeded to log the warm reset issue with our USB3 analyser.  The tested Hardware is our USB3 camera instead of your demokit, but the issue is the same.

Note that the Low Power Management is disabled in our firmware.

The PC application does:

While(1)

{

- "Write camera registers" to start camera acquisition on endpoint 0.

- Grab 1 image from camera on endpoint3

- "Write camera registers" to StopAcquisition" by writting on endpoint 0

}

Each "Write camera register" on endpoint 0 is splitted in 2 parts:   Write 8 bytes to camera, then read 4 bytes to get the status of the write operation.

This is the same mechanism that we implement in the previous code we sent to you.

Warm reset occurs at packet 3490052.

Regards

Yves

0 Likes

Hi yves,

Is your design self-powered? If yes, are you plugging out and re-plugging the USB cable in between the operation?

Regards,

Hemanth

Hemanth
0 Likes

Our camera draws its power directly from the computer through the USB cable, so we don't unplug/replug the USB cable between operations.

Regards

Yves

0 Likes

Hi Hemanth

Have you been able to reproduce and investigate on this issue? This problem is currently a show stopper in our customers applications.

Thank you for your help.

Pascal

0 Likes

Hi Hemanth

I don't see here your last message so I copy it and answer.

Hi Pascal, We are looking into the issue. I need one more comment from you. Currently in your firmware, where you were able to
capture the trace, the LpmDisable() is called in the SET_CONF handler right? -
Regards, Hemanth

Our answer:

  • Yes the LPM Disable is done in CY_U3P_EVENT_SETCONF

Thank you

Pascal

0 Likes

Issue is specific to the Host PC used and is not generally seen with all the PCs.

Hemanth
0 Likes