cancel
Showing results for 
Search instead for 
Did you mean: 

usb bulk transfer

mrjaner
Associate II
Posted on October 23, 2014 at 11:29

before i was using pic18f2550 for usb connection on our product, now i decided to use stm32f4 anymore. but i couldnt find any simple usb bulk example (except cdc,hid). i am hardware engineer not software expert. i need an example project like this, 

bulkRead(

myOutPipe,SendData,SendLength

);

bulkWrite(

myInPipe,ReceiveData,ExpectedReceiveLength

);

best regards

#usb-bulk
2 REPLIES 2
chen
Associate II
Posted on October 23, 2014 at 11:43

Hi

''i am hardware engineer not software expert.''

Noted! (FYI I started as a electronics engineer but changed over to software and now specialise in embedded ie the HW/SW interface)

''now i decided to use stm32f4''

'' i couldnt find any simple usb bulk example (except cdc,hid). i am ''

''i need an example project like this, 

bulkRead(

myOutPipe,SendData,SendLength

);

bulkWrite(

myInPipe,ReceiveData,ExpectedReceiveLength

);''

The problem is that this is low level stuff and implicitly bound in a USB device type, so you have to deal with one USB device type in order to look at an example of how bulk transfer is done in code.

The

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1734/PF257882

contains examples of 5 device types (CDC, HID, MSC DFU and Audio)

CDC and HID are the easiest to work out and understand.

DFU and Audio are probably your best bet for bulk transfers.

The bulk transfer code is probably in the 'device core' part of the code. I personally have not had to work out that code because it just worked but I can try to have a look and work through it with you.

chen
Associate II
Posted on October 23, 2014 at 11:51

Hi

OK, so I had a look at the device core and core part of a USB CDC device and of course there are no obvious bulk transfer code (because that is the one I am working on and most familiar with).

I think that is because a) CDC does not really need bulk transfer b) it is likely to be IRQ driven.

I will have to have a look in DFU or Sound Device at some point.