cancel
Showing results for 
Search instead for 
Did you mean: 

USB - need example of simplest use.

morpeh89
Associate II
Posted on September 09, 2010 at 13:21

USB - need example of simplest use.

8 REPLIES 8
stforum2
Associate II
Posted on May 17, 2011 at 14:06

''I assume, that when I want just to send and receive bytes, there is a easier way.''

But that's basically all that the USB interface does - sends and receives bytes.  So you have the same task ahead of you as all of the other USB developers that you will find here.

morpeh89
Associate II
Posted on May 17, 2011 at 14:06

Yes, but in all examples there are specific implementation of such send/receive option (such as mass storage device, HID device etc.). When I started looking through the code of examples, I understood, that the major portion of it is unnecessary for my program. Moreover, it's almost impossible to find necessary part of it. There are many separate files, most of them are bulky.

Of course, I didn't hope very much, that USB is simple. But at the moment it even seems to be enormously hard (for me, as for beginner) :\

p.s. still hope that help comes 🙂

lipin
Associate II
Posted on May 17, 2011 at 14:06

Hi,

I believe WinUSB library it its probably simplest solution. On the other hand why not to use simple hardware solution like serialusb converter and with build in STM32 usart you can get up to 4,5 Mbaud/sec it itis

450kB/sec is it enough?. I would probably dig in more into STM32 usb (give yourself at least 2 weeks)

but if you are in a rush you may consider this.

Regards

Thomas

PS. I use profilic converter (pl-2303) from old mobile phonecable mine goes nuts above 1Mbit/sec but mine friend has it on board and can go easily up to 3Mbit/sec. Watch out for this issue.

lipin
Associate II
Posted on May 17, 2011 at 14:06

Also look at this post it seems that getting high speeds is not that easy.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM CortexM3 STM32/Testing STM32 FS USB Library Performance&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%2520CortexM3%2520STM32/AllItems.aspx&currentviews=234]https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Testing%20STM32%20FS%20USB%20Library%20Performance&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%2520CortexM3%2520STM32/AllItems.aspx&currentviews=234

Andrew Neil
Chief II
Posted on May 17, 2011 at 14:06

''they seem to be too complicated in my simple case''

 

That's because USB is not simple!

See:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM CortexM3 STM32/USB simple Example&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=210]https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fARM%20CortexM3%20STM32%2fUSB%20simple%20Example&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=210

See also: 

http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/63246.aspx

- in particular, my post of 8 Sep 2010 4:27 AM:

''it takes a great deal of effort to make something appear effortless!''

 

 

Andrew Neil
Chief II
Posted on May 17, 2011 at 14:06

''need higher speed than in the case of USART''

 

What speed do you actually need?

morpeh89
Associate II
Posted on May 17, 2011 at 14:06

Thanks to everybody!

Posted on May 17, 2011 at 14:06

In terms of pushing data to/from a USB peripheral in Windows, making the device ''appear'' to be a Serial-Port or Mass-Storage-Device would be a relatively less complex approach. Especially if Windows provides native support for it. YMMV

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..