cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

WGT_4383351
New Contributor II

Two CYUSB3KIT-003 are stack connected and the firmware are downloaded to RAM and 8KB file is transfered successfully as 001-87216_AN87216_Designing_a_GPIF_II_Master_Interface.pdf described.

I opened two Streamer.exe are opened, one choose master devices' BULK OUT, anoter choose slave devices's BULK IN and start transfer on both, there is almost no bandwidth and most packet are timeout.

How to test the bandwidth of this configuration?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

Hello,

I have tried reproducing the issue at my with firmware i shared but i am not able to reproduce the same.

OUT stopped and only IN transfers

OUT_stopped.PNG

IN stopped and only OUT transfers

IN_Stopped.PNG

Please try by un-checking the Show Transferred Data. I observed that when this check box is marked the Transfer rate drops

show_data_transfer.PNG

Please let me know the results

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
30 Replies
JayakrishnaT_76
Moderator
Moderator

Hello,

Did you check the data transfers by using control center application as shown in Fig 29 to Fig 34 of the Application Note AN87216? The link to the Application Note is given below:

https://www.cypress.com/file/124206/download

Please try this and let us know the result. This can be used to verify whether the data transfer is actually happening or not. If you get error code 997 in control center, then the data transfer is not successful. Please do this test and let us know the result.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
WGT_4383351
New Contributor II

8KB file transfer tested.

0 Likes
WGT_4383351
New Contributor II

"8KB file is transfered successfully" - the problem is how to test a 3Gbps+ test using Streamer.exe

0 Likes
JayakrishnaT_76
Moderator
Moderator

Hello,

I understand that the data transfer using control center was successful from your response 3.

Please share the snapshots of the streamer application when you get failures so that we can understand the problem better.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes
WGT_4383351
New Contributor II

I found in "001-86947_AN86947_Optimizing_USB_3.0_Throughput_with_EZ-USB_FX3.pdf" Streamer.exe may only support some specific firmware to test.

0 Likes
WGT_4383351
New Contributor II

But I wonder why this program can't be used with the above firmware. Can it be used for this?

0 Likes
WGT_4383351
New Contributor II

With different settings of Streamer.exe, the fail rate is different. For example, with defult 1500ms timeout and 8 pack per transfer and 1 xfer to queue, it transfer 8 ok pack with 1 fail pack per 1500ms. So the reason seems to be the 1 fail pack with 1500ms timeout

0 Likes
WGT_4383351
New Contributor II

This also means the reason of fail is software - probably Streamer.exe is not comptible with the above firmware.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

Edited:

Please confirm that you are using the default firmware with application note.

- If you are using the default firmware, the streamer application cannot be used with the default settings of packets per Xfer and Xfer per queue. This is because the DMA buffer size used is 2 KB (USB 3.0) and 1 KB (USB 2.0).

- Also the BULK endpoint size is 1024 bytes. You can try increasing the Endpoint size by setting the burst size to 16

- Along with BULK endpoint, you can also try changing the DMA buffer size equal to the Bulk endpoint size (16 *1024). On changing the DMA buffer size, the Data counter and Addr counter values also need to be modified in the state machine as well as in the firmware. The counter value is calculated

(counter value ) = (DMA buffersize)/ (GPIF bus width in bytes) - 1

- The data throughput mentioned in AN86947 is calculated using bulksrcsink example in which the CPU itself generates the data and doesn't depend on any interface timings. This cannot be compared with AN 87216 firmware as this is more dependent on the GPIF interface timings

Regards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

Can you give more detail about how to modify the firmware and to set the UI of streamer?

(1) "You can try increasing the Endpoint size by setting the burst size to 16" - where to set "burst size" in the firmware?

(2) Since GPIF can deliver 400MB/s, the best performance difference between AN86947 and AN87216 could be similar. The source of problem could be host software/firmware configurations.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

1) (1) "You can try increasing the Endpoint size by setting the burst size to 16" - where to set "burst size" in the firmware?

>> There is a Macro, you can change CY_FX_EP_BURST_LENGTH value  in gpiftousb.h file

2) Since GPIF can deliver 400MB/s, the best performance difference between AN86947 and AN87216 could be similar. The source of problem could be host software/firmware configurations

>> The Slavefifo state machine which implemented in the AUTO Slave  firmware will sample the data only when SLWR pin is low

- And AUTO MASTER will send the data or assert SLWR only when the DMA buffer flags indicates that the buffer is ready. If the buffer is full it will change the address line values  to switch the thread. So these timings generates delay in the data transfers.

FX3 SDK has a firmware GPIF to USB . I modified the default firmware to USB > GPIF and tested back to back FX3 implementation (as done with AUTO SLAVE and AUTO Master)

USB > GPIF  ------ GPIF > USB

These are the results with DMA buffer size as 16KB and BULK endpoint size as 16KB

gpif_throughput.PNG

Regards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

If you have stacked CYUSB3KIT-003 in hand as described by AN87216 , could you check XferData() doesn't return when data arrives during wait , especially quote:

"

Now I have tested with Control center too, same result.

Test method:

(1) Load master and slave firmware to board

(2) Open two control center

(3) Click transfer data in button for slave in one control center to receive 1KB data, it will be blocked since there is no data and will time out soon

(4) Quickly (before slave time out) get to another control center and press transfer data out button for master twice to send 2*1KB data to master. (Why twice - this is another problem, if you only send 1*1KB, the slave will always timeout. But this have nothing to do with this question, just send 2*1KB - or 1*2KB)

(5)Switch back to the first control center and wait for the time out and fail(unexpected as described, the expected behavior is it receive 1KB data succesully immediately after you send 2*1KB to the master board). Then press data in button for slave twice, both 1KB will be received succesfully.

"

If your last response work, then this quoted question doesn't have to be solved, only for interest - why.

0 Likes
WGT_4383351
New Contributor II

"tested back to back FX3 implementation" Is your hardware exactly the same as described in AN87216 - stacked CYUSB3KIT-003 with cutted headers?

"I modified the default firmware to USB > GPIF" Could you provide steps to modify? At least an outline?

Now my starting point is:

(1) Import C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxgpiftousb into Eclipse.

(2) Two CYUSB3KIT-003 connected as described in AN87216

(3) CY_FX_EP_BURST_LENGTH is already 16, no modification needed.

I'v not learned to use the GPIF editor, the original plan is to use the master/slave firmware as start point but this seems doesn't work.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

Yes, i have checked the firmware and got the above mentioned results with two CYUSB3KIT-003  back to back.

I have attached the firmware, UsbToGpif folder contains the modified GpifToUsb firmware which will act as master (i.e. provide the PCLK) and GpifToUsb Default firmware will act as slave.

Please let me know if any queries

Regards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

"I have attached the firmware" - where?

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello ,

The firmware is attached in the previous response

pastedImage_0.pngRegards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

I can't see the attachment. Can you provide the download link as text?

0 Likes
WGT_4383351
New Contributor II

The expected behavior is: Whether you start stream out or stream in first, the first stream will block since all data buffer in both FX3 will be full/empty immediately. Once you start the second stream, both will have 300MB/s+ speed. Once you stop one streamer, both will stop again. No stuck/deadlock like behavior.

0 Likes
WGT_4383351
New Contributor II

I'v caught some event on serial port:

(1) Load default firmware(considered slave) then modified firmware

(2) Start streamer out with stabled at 300MB/s+

(3) Start streamer in, the speed is jumping a round 0-5MB/s

(4) Events on streamer in FX3: (repeated message)

EP Event: ep=81 event=16

0 Likes
WGT_4383351
New Contributor II

I used the img file in the attachment which use PCLK. And the hardware is tested with data thransfer using Master/Slave firmware - hardware is OK.

And the slave can get some data which may implies PCLK is present.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

I have tried reproducing the issue at my with firmware i shared but i am not able to reproduce the same.

OUT stopped and only IN transfers

OUT_stopped.PNG

IN stopped and only OUT transfers

IN_Stopped.PNG

Please try by un-checking the Show Transferred Data. I observed that when this check box is marked the Transfer rate drops

show_data_transfer.PNG

Please let me know the results

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
WGT_4383351
New Contributor II

Why both button are "start"? I didn't show the content. Only IN have problem.

(1) load both firmware

(2) Open only one streamer for IN, choose the 16KB IN endpoint and start

(3) First speed is ~15MB/s , then become to decrease - seems that the value is everage and the transfer just stopped. And serial port messages "EP Event: ep=81 event=16" are received. If you press stop then start again, it will always be zero.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

I reproduced the same as mentioned in your previous reply

Why both button are "start"? I didn't show the content. Only IN have problem.

>> That is because to take the snippet i had to stop the streamer.

The results after following the steps mentioned in your previous response.

gpif_in.PNG

Can you send the snippet of streamer application on failing.

Also try not using the connector (for connecting both FX3). Just try using two jumper wires one for ground and other one for PCLK. If needed you can connect DQ31 pin of both the FX3, using jumper wire, to check the data is coming r not.

Regards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

Here are some serial port messges:

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=256

Halting USB Streaming EP: 1

-------dead, stop streamer, abort pipe/reset pipe then start streamer again

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=256

Halting USB Streaming EP: 2

-------dead, stop streamer, abort pipe/reset pipe then start streamer again

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=16

EP Event: ep=81 event=256

Halting USB Streaming EP: 3

0 Likes
WGT_4383351
New Contributor II

So it run for a random time then even 256 occured then halted.

0 Likes
WGT_4383351
New Contributor II

The hareware have been tested with master/slave, data can be transfered on both direction.

You can see that each event=16 corresponds to one OK packet on the right.

Did you check whether you have those event=16 messages?

1.jpg

0 Likes
WGT_4383351
New Contributor II

You have to click the image to see the full image

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

I tested the debug prints. I am not able to reproduce the issue you are having.

gpif_serial_ort.PNG

I also notices that you are not using the streamer application which is in the FX3 SDK. Please use the streamer application from the SDK.

These are the reason for event

CYU3P_USBEP_SS_RETRY_EVT = 16,      /**< An ACK TP with the RETRY bit was received on the IN endpoint. */

CYU3P_USBEP_SS_RESET_EVT = 256      /**< USB 3.0 endpoint reset event. A stall recovery is required. */

Please try removing the connector and just connecting FX3 using jumper wires as mentioned in previous response.

I have attached the folder with firmware again

Regards,

Rashi

Regards,
Rashi
0 Likes
WGT_4383351
New Contributor II

In fact event=16 message count = OK packet count-1. The last OK packet corresponds to event=256

0 Likes
WGT_4383351
New Contributor II

The streamer is from C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\bin, why do you think it is not from SDK?

"I have attached the folder with firmware again" are there changes? If so please send a copy to my email, still can't see the atachment.

0 Likes