USB superspeed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
soft environment:
ubuntu 16.04 + cyusb3014
Problem Description:
My goal is to get the data uploaded by cyusb3014,but whenever the program runs for 4-5 hours, the reception timeout will suddenly appear.
With the help of monusb under linux,I caught it at that moment, urb status = -2,and no matter what I call cyusb_reset_device() or cyusb_clear_halt(),it can't afford any effect。
so, What causes this phenomenon? How can I perform the operation to let the reception continue?
I am looking forward to your reply. This problem has been bothering me for a week.
--------------------------------------------------------------------------------------------------------------
Attach my code about bulk transfer:
bool USBHandler::USBIn(unsigned char * buffer, size_t bufferSize){
HANDLENotNULL;
int r;
libusb_context *ctx = NULL;
struct libusb_transfer *transfers = libusb_alloc_transfer (0);
int transferred = 0;
int pkg_size=1228800;
if (transfers == NULL)
{
printf ("Failed to allocate buffers and transfer structures\n");
free_transfer_buffers (transfers);
return false;
}
libusb_fill_bulk_transfer (transfers, getRealHandler(h1), 0x83,buffer, 1228800, xfer_callback, NULL, 100);
r = libusb_submit_transfer (transfers);
cout<<"submit status:"<<r<<endl;
if(r<0)
{
// libusb_cancel_transfer(transfers);
free_transfer_buffers(transfers);
return false;
}
SetTransmitPicure(1);
do
{
libusb_handle_events (NULL);
} while ((!get_one_frame)&&(!error_happen)&&(!time_out_happen));
if(error_happen)
{
Reset();
}
if(time_out_happen)
{
//Reset();
}
cout<<"error_count:"<<error_count<<endl;
cout<<"transfer timeout_count:"<<time_out_count<<endl;
if((error_happen)||(time_out_happen))
{
error_happen = 0;
time_out_happen = 0;
return false;
}
get_one_frame = 0 ;
return true;
}
void USBHandler::xfer_callback (
struct libusb_transfer *transfer)
{
int r = 0;
switch (transfer->status)
{
case LIBUSB_TRANSFER_COMPLETED:
cout<<"transfer complete!"<<endl;
get_one_frame = 1;
free_transfer_buffers(transfer);
break;
case LIBUSB_TRANSFER_ERROR:
error_happen = 1;
error_count++;
cout<<"transfer uncomplete!"<<endl;
libusb_cancel_transfer(transfer);
free_transfer_buffers(transfer);
break;
case LIBUSB_TRANSFER_TIMED_OUT:
time_out_happen = 1;
time_out_count++;
libusb_cancel_transfer(transfer);
free_transfer_buffers(transfer);
break;
default:
error_happen = 1;
error_count++;
cout<<"other error happen!"<<endl;
libusb_cancel_transfer(transfer);
free_transfer_buffers(transfer);
break;
}
}
Show LessI want to use FX3 to communicate with PC using SPI. Which example should I refer to?
Please tell us about the system created as UVC. * UVC has been realized using FX3
How to notify external trigger signal to application via UVC Do you have?
Show LessHi,
I have a question towards the SLWR and SLCS timing in the master side GPIFII interface.
In Figure 6. of the AN82716, the SLCS signal becomes low and then the SLWR signal becomes low.
I've also attached the snapshot of the figure in attachment.
The timing diagram of the GPIFII designer project of the master side shows the SLWR comes low before the SLCS signal.
Please see the attached master_gpif2_designer file.
Is there anything I misunderstand?
Thanks,
Jay
Show LessHi,
I've already completed "2592x1944x1(Y8) or 2 bytes(Y16 to Y)" CMOS sensor(MT9P031, 12 bit gray color) in Super Speed(USB 3.0).
And, I also want to use "2592x1944x1 byte(Y8)" in High speed with FX3.
I tried the following DMA buffer size and "1280x720x1byte in High speed" is working well. But 2592x1944x1byte is not working.
---------------------------- <ref.: https://community.cypress.com/thread/35193?start=0&tstart=0 >
...
2. Increase the DMA buffer size to 48*1024 bytes and DMA buffer count to 2 while creating the DMA channel using CyU3PDmaMultiChannelCreate API
a. Change the 0x00, 0xC0, 0x00, 0x00, /* No. of bytes device can rx in single payload = 48 KB */ in probe control structures
b. Change the GPIF LD_DATA_COUNT and LD_ADDR_COUNT as per Configuring Buffer Sizes in AN75779 UVC Firmware – KBA90744
c. i.e. LD_DATA_COUNT = LD_ADDR_COUNT = ((48*1024 -12-4)/2) -1 = 24567 -> I changed this to ((48*1024 -12-4)/1) -1 = 49135
...
------------------------------
I also tried 64*1024 DMA size but there was a error message like...
------------------------------ Error message on Serial debugging
DMA Channel Creation Failed, Error Code = 64
Error handler...
Error handler...
...
-----------------------------------
How to change DMA buffer size or anything else ?
Thanks a lot!
Don
Show LessHi everyone!
Unfortunately this topic was locked.
I need to control data integrity of FX3 GPIF bus in PP mode. There is some CRC engine, but it is not documented at all.
I tried to make it work and I have some successful results:
I can configure this CRC over GPIF_CRC_CONFIG and GPIF_CRC_DATA regs.
First set ENABLE = 1 (bit 31) of GPIF_CRC_CONFIG and INITIAL_VALUE[15:0] = 0xFFFF of GPIF_CRC_DATA reg.
Manually changing bits in GPIF FSM configuration I could make it work in write direction (from FX3 to AP).
I used BETA_INIT_CRC bit to reset init value to previously defined INITIAL_VALUE[15:0] and BETA_CALC_CRC to make calculation.
Calculated CRC appears in CRC_VALUE[15:0] of GPIF_CRC_DATA reg.
I figured out that "CRC-16/CCITT-FALSE" with params poly = 0x1021 is used in hardware.
QUESTION: I run GPIF in 32-bit mode, but that CRC16 does not use higher 16 bits of bus during calculation. In other words only lower 16-bits
are CRC controlled. How to make it work in 32-bit mode, not 16-bit? What am I doing wrong?
P.S. I don't need working example, just explain it here please. I need it very much. Thank you!
Best regards
Show LessStarting layout of a design based on the Cy4609-RDK-BOARD and downloaded the zip file "630_60155-01_CY4609_final_20140407"
It does not have any PCB layout info in it. Does anyone know where I can get gerbers or Altium PCBdoc or allegro pcb files? It would save me a lot of work.
thanks
Tony
Show LessHi there,
I'm using Cy68013a and now I'm trying to generate an application installer, which needs the USB driver installer. while the drivers I found do not have installers. any suggestions?
Thanks,
Paul
Show LessHi,
When I configure an output pin with CyU3PDeviceGpioOverride() and CyU2PGpioSetSimpleConfig(), a pull-up resistor must be applied to the pin to output the high level. So I guess the default output mode of GPIO is open drain output.
How do I set the pin output mode to push-pull output mode?
Best regards,
Thomas
Show Less