Announcements

Register now for the most anticipated Asia Pacific Power Seminar 2022

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

USB superspeed peripherals Forum Discussions

wyw
Level 3
25 replies posted 25 sign-ins 10 replies posted
Level 3

i use usb3014 chip,hardware connection orders is fpga->gpif->usb3014->usb host(linux os),and fpga send data to usb3014 by gpif(gpif use 5bit address sync fifo mode) fifo address at 2,usb3014 dma buffer size is 10*1024 bytes,count is 2,dma use auto mode,usb3014 passthrough data to host by bulk endpoint  2,the host driver is self-developed.

The problem:

When the host is receiving data, error -71 occurs in the host driver, indicating a protocol error,this error may be caused by that part?

0 Likes
1 Solution
AliAsgar
Moderator
Moderator 50 likes received 500 replies posted 250 replies posted
Moderator

Hi,

Try binding the CYUSB3014 device to the standard libusb driver on the linux, and then use the cyusb_linux host application on the linux to get the data. Please let us know if you face any issues there.

Best Regards,
AliAsgar

View solution in original post

0 Likes
3 Replies
AliAsgar
Moderator
Moderator 50 likes received 500 replies posted 250 replies posted
Moderator

Hi,

1. Could you share with us your host application source code? If not, could you share with us the code snippet of the line where the error is seen.

2. Do you confirm that atleast one buffer full of data is ready at the USB socket, when host asks for data?

3. Is your host driver similar to cyusb3 vendor driver?

Best Regards,
AliAsgar

0 Likes
wyw
Level 3
25 replies posted 25 sign-ins 10 replies posted
Level 3

1.Attached are my USB3014 project .

2.There should be no protocol errors even if the USB socket has no data.

3.host driver developed by myself.

Location of the host driver error:

static void usb_read_bulk_callback(struct urb *urb)
{
struct usb_str *dev;
unsigned long flags;
int i;

dev = urb->context;

spin_lock_irqsave(&dev->err_lock, flags);
/* sync/async unlink faults aren't errors */
if (urb->status) {
if (!(urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN))
dev_err(&dev->interface->dev,"%s[%d] - nonzero urb status : %d\n",
__func__, __LINE__, urb->status);

dev->errors = urb->status;
} else {
dev->bulk_in_filled = urb->actual_length;
}
spin_unlock_irqrestore(&dev->err_lock, flags);

up(&dev->read_sem);
}

When applicaion call read(fd, buff, 10*1024), the my device driver populates the URB and submits it to the usb host driver, waits for an interrupt callback, and checks the status of the URB and urb->status = -71,above is my registered interrupt callback function.

0 Likes
AliAsgar
Moderator
Moderator 50 likes received 500 replies posted 250 replies posted
Moderator

Hi,

Try binding the CYUSB3014 device to the standard libusb driver on the linux, and then use the cyusb_linux host application on the linux to get the data. Please let us know if you face any issues there.

Best Regards,
AliAsgar

0 Likes