2010-09-09 04:21 AM
USB - need example of simplest use.
2011-05-17 05:06 AM
''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.2011-05-17 05:06 AM
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 :)2011-05-17 05:06 AM
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.
2011-05-17 05:06 AM
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¤tviews=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¤tviews=234
2011-05-17 05:06 AM
''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¤tviews=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¤tviews=210 See also: - in particular, my post of 8 Sep 2010 4:27 AM:''it takes a great deal of effort to make something appear effortless!''
2011-05-17 05:06 AM
''need higher speed than in the case of USART''
What speed do you actually need?
2011-05-17 05:06 AM
Thanks to everybody!
2011-05-17 05:06 AM
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