cancel
Showing results for 
Search instead for 
Did you mean: 

USB Newbie question

gkruger
Associate II
Posted on August 06, 2007 at 10:54

USB Newbie question

9 REPLIES 9
gkruger
Associate II
Posted on May 17, 2011 at 09:45

Thank you Nikolay,

Am I correct when I say that if I don't want to use the file system I need to write drivers on the pc side to receive the data. But if I had a fat file system in place, I could download the files using windows explorer if I wanted?

Regards,

Gert

gkruger
Associate II
Posted on May 17, 2011 at 09:45

Hi,

I would like to send some data(quite a lot actually) to the pc. It looks like the best way would be to use the USB bulk transfer demo, and work from there?

I have the data stored on an SD card (no fat file system at the moment). Would I need a fat file system to be able to use bulk transfer?

I currently use the uart to send the data, but that is taking too long.

Am I approaching this the right way? Any suggestions will be greatly appreciated!

Regards,

Gert

npivo
Associate II
Posted on May 17, 2011 at 09:45

For the Bulk-USB tranzaction you do not need any file system at all.

In short words it's look like low send-recieve packets.

[ This message was edited by: NikolayZ on 04-08-2007 15:47 ]

ben2
Associate II
Posted on May 17, 2011 at 09:45

to access the sd card from the micro you would need to implement what ever file system you use to format it. It doesnt have to be FAT. I beleve, but could be wrong, that the USB mass storage driver uses a subset of SCSI commands to read/write blocks, so you could use any file system that your PC supports. FAT is probably the easiest to implement and if you search this forum or maybe the STR7 one you will find some posts on implementing it.

You can find something here

http://efsl.be/

I am not sure if there are any patent issues concerning FAT though.

Ben

gkruger
Associate II
Posted on May 17, 2011 at 09:45

Thanks Ben.

Will look at the efsl in more detail.

Regards,

Gert

veselev
Associate II
Posted on May 17, 2011 at 09:45

I've solved similary problem. Usb library was a great help. In that sample used SRAM as a media storage. You should change memory.h and memory.c files to redirect requests to your media storage. There are SCSI requests used. When device is connected, windows detects mass storage device and offers to format it. So, win will make FAT itself. But in my design, I had to build FAT in code, because I have specific requirements to my device.

veselev
Associate II
Posted on May 17, 2011 at 09:45

Here is the project for RIDE IDE, GNU compiler. If you use another IDE, make your own project, but use source code.

gkruger
Associate II
Posted on May 17, 2011 at 09:45

Thank you very much,

Will have a look at that.

I will also have to create the fat in code, as I need to write data to a file. So I will start with that part 🙂

Regards,

Gert

veselev
Associate II
Posted on May 17, 2011 at 09:45

if you need FAT support, this code can be useful. It's a raw code. I generate BPB sector, FAT tables and root directory in SRAM, because external flash used only for storage data and I can't use it fo sotage something else.