cancel
Showing results for 
Search instead for 
Did you mean: 

USB Bulk transfer

sanjeevk
Associate II
Posted on February 21, 2007 at 08:30

USB Bulk transfer

1 REPLY 1
sanjeevk
Associate II
Posted on May 17, 2011 at 09:35

Hi

We are trying to use USB bulk transfer(STR91x) for one of our applications.

Requirement:

We should be able to transfer a series of blocks of data(typ.2KB/transfer) to STR91x eval board, intimate the eval board and wait for an acknowledgement(which could be few bytes, typ. < 1kB)after each block transfer. On reception of the acknowledgement, transfer next block till we have completed all block transfers.

Implementation:

As a starting point(and also because we have less time for our first demo) we thought we will use the USB mass storage example. Basically handling the Blocks of data and handshaking(acknowledgements etc.) as files on mass storage device. We have created three files ( Buffer.txt for writing blocks of data, Status.txt for telling the eval board that a block has been written, Control.txt for telling that block has been read) using Turbo C and manipulating for transfer of blocks of data. So from host it's like manipulating files, where as for eval board it's like accessing the memory for reading the buffer.txt and other files as we know the exact locations where the files are allocated memory.

Problem:

There is no problem in writing a block of data to the Buffer.txt and updating status.txt. But the problem is when we update some part of the memory which we have identified as control.txt from the evalbord. Though the debugger shows the memory as being updated, the files are not updated yet and don't reflect on the host. Initially we thought it's because of some CRC or checksum of FAT file system. But later we found that it's because of non-synchronisation. If we disconnect and connect USB connector the eval-board back, we can see the changes in memory.

Queries:

1. Is our approach correct? or if there are better ways of doing it.

2. Could I force the disconnect and connect events in the eval board to ensure the synchronisation.

I appreciate any support regarding this and sincerely apologise for this long message.

Thanks in advance

Sanjeeva