Page 1 of 1

sub_fifo_read() returns -7

Posted: Sun Apr 24, 2011 8:41 am
by sreejith6320
I',m using sub_fifo_read() and returns -7. Anyone please explain why it is happening?

Re: sub_fifo_read() returns -7

Posted: Sun Apr 24, 2011 4:12 pm
by serg
Hi,

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

Regards

Re: sub_fifo_read() returns -7

Posted: Mon Apr 25, 2011 3:54 am
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

Re: sub_fifo_read() returns -7

Posted: Mon Apr 25, 2011 5:01 am
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, 

Re: sub_fifo_read() returns -7

Posted: Mon Apr 25, 2011 10:42 am
by sreejith6320
I had done what you had said but still I'm getting the same error. .... ;-(

Re: sub_fifo_read() returns -7

Posted: Mon Apr 25, 2011 11:31 am
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.