What kind of device

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

davev
Posts: 18
Joined: Fri Oct 22, 2010 4:12 pm

What kind of device

Sat Oct 23, 2010 1:56 am

I am in the process of implementing a new device that is a piece of test equipment. It uses a SAM3U4E MCU as the processor & USB connection. This device requires a small amount of configuration (less than 100 bytes) but produces large volumes (<= 20MB/s and possibly <= 40MB/s). With those kinds of data rates, it can't be a HID or CDC communications device. I was thinking of making it an MSD device but I don't want to have to deal with a file system (there is none, the device just streams data). But, I also would prefer not to have to develop a custom driver because I will be using this device on Windows 7 and would like to use a driver that is included with Windows.

Given all of that, can anyone give me any advice on what kind of USB device this should be?
aethaniel
Posts: 20
Joined: Tue Feb 05, 2008 11:46 am

Re: What kind of device

Mon Oct 25, 2010 2:17 pm

Hi,

it seems you already saw all common device drivers present into windows systems.

As there is no bulk driver and to avoid to develop your own or a dedicated user space USB application, maybe the best approach for you could be to declare a MSC device, prepare the good answers to FAT reading request by specifying a fake FAT showing some small virtual files of 512 bytes, and finally use these virtual files to drive your device using common drivers either under windows or linux/MacOS/whatever...

To be more precise: FAT read is done by reading LBA blocks on USB, so you have only to intercept the ones you want by writing precise callbacks.
davev
Posts: 18
Joined: Fri Oct 22, 2010 4:12 pm

Re: What kind of device

Mon Oct 25, 2010 4:23 pm

Thanks for the information aethaniel. It sounds like I really need to read up on MSD devices under USB. Do you, or anyone else, know of a code example that does what you are saying I need to do for my device? I'm afraid that I'm just not knowledgeable enough on USB implementations to be understand exactly what has to be done to make this work.
aethaniel
Posts: 20
Joined: Tue Feb 05, 2008 11:46 am

Re: What kind of device

Mon Oct 25, 2010 5:56 pm

Well, that depends on which USB stack you decided to use at first.
Once you have the stack, for sure there wil be a MSC driver included. Then someone should be able to guide you to obtain the expected result.

Tell us what choice you did regarding the stack and for sure you will obtain guidelines.
davev
Posts: 18
Joined: Fri Oct 22, 2010 4:12 pm

Re: What kind of device

Mon Oct 25, 2010 6:04 pm

I plan to make this an MSD device. I will use the example code for the SAM3U4E (it is actually code for SAM3U-EK eval board) as a starting point. The actual example is usb-device-massstorage-project-at91sam3u-ek.

So given that, can you or anyone else point me in the general direction of the kinds of changes I will need to make?

I am reading through the Atmel AT91 USB MSD Driver Implementation document to get a better understanding of how it works.
Crossware
Posts: 8
Joined: Sat Oct 17, 2009 3:13 pm

Re: What kind of device

Wed Oct 27, 2010 2:04 pm

Windows 7 has a built-in driver for bulk transfer. Search for 'winUSB'.

A mass storage device is probably not going to do what you want. Our tests indicated that Windows caches the files and directories and so if you create or modify a file via the microcontroller, then Windows will not see any changes.

Best regards

Crossware
http://www.crossware.com
davev
Posts: 18
Joined: Fri Oct 22, 2010 4:12 pm

Re: What kind of device

Thu Nov 04, 2010 1:44 am

I've ended up making this a LibUSB device since that's something I've worked with quite a bit in the past.
While I have my software working on the SAM3U-EK board, I can't get it to work on our board. It never finishes the USB enumeration. I have made another post regarding that problem.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests