sub_fifo_read() returns -7

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
sreejith6320
Posts: 12
Joined: Tue Mar 22, 2011 9:46 am

sub_fifo_read() returns -7

Post by sreejith6320 »

I',m using sub_fifo_read() and returns -7. Anyone please explain why it is happening?

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: sub_fifo_read() returns -7

Post by serg »

Hi,

What is your target OS version, SUB-20 software package version, how to reproduce your issue?

Regards

sreejith6320
Posts: 12
Joined: Tue Mar 22, 2011 9:46 am

Re: sub_fifo_read() returns -7

Post by sreejith6320 »

Target OS is ubuntu 10.01 and software package version is SUB-20-snap-100910.
In my project, I have a master and configured sub20 in slave mode. Master sends data through spi. So I need to read that value

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: sub_fifo_read() returns -7

Post by serg »

Try the SUB-20-snap-110319.tgz with the following fix:

change the libusb.c, line 1989
from

Code: Select all

 rc = libusb_bulk_transfer( hndl, SUB_FIFO_IN_EP, (unsigned char*)buf, 
to

Code: Select all

rc = libusb_bulk_transfer( hndl, SUB_FIFO_IN_EP, (unsigned char*)tmp_buf, 

sreejith6320
Posts: 12
Joined: Tue Mar 22, 2011 9:46 am

Re: sub_fifo_read() returns -7

Post by sreejith6320 »

I had done what you had said but still I'm getting the same error. .... ;-(

sreejith6320
Posts: 12
Joined: Tue Mar 22, 2011 9:46 am

Re: sub_fifo_read() returns -7

Post by sreejith6320 »

In my system I had a master which sends the data which is to displayed in LCD of resolution 128 X 64. So it will send maximum of 1024 bytes of data. So I need to read all of them and corresponding gpio value of each byte of data. For reading I'm using sub20 which is configured in slave mode and data is read using fifo. And here I'm having the problem. The function sub_fifo_read() is returning -7.

Post Reply