2011-07-09 02:13 PM
Hello!
I've adjusted the Virtual Com Port example from the FS USB Library V3.2.1/V3.3.0 to my needs on STM32F103RC. It works. As a preparation to merge USB CDC and Mass Storage (suggestions and solutions are welcome!) I'm trying now first to ''move'' the COM communication to the endpoints 4,5 and 6 instead of the origin 1,2 and 3 in the example. It does not work. Exactly, the Virtual COM does appear under Win7 (endpoint 0 is untouched) but no communication occures. I think I've missed some substitution or misunderstood the allocation of the endpoints. Could anyone share with me a kind of check list, what changes/substitutions should be made to the application part of the USB library (usb_conf.h, usb_desc (.h, .c),usb_prop (.h, .c), usb_endp.c, usb_istr (.h,.c) and
usb_pwr (.h, .c)) to get the communication over EP4, EP5 and EP6? TIA. #usb-endpoints-change #virtual-com-port-alternative-endpoints #composite-virtual-com #usb-cdc-rl-usb-severe-mistake
2011-07-11 01:33 AM
Are you trying to make a composite device ? Is mass-storage the 1st interface ? Can you post yr fw here ?
2011-07-11 05:28 AM
2011-07-15 12:15 AM
Was it a killer question? Any from ST who wrote the USB lib? Or was it in India?
2011-07-18 06:18 AM
''Was it a killer question? ''
Sorry, i wasnt getting time to visit the forum due to my current assignments. it seems the assignment of EPs is OK, did you make relevant changes in descriptors as well ? Is it possible to show your configuration descriptor ? The reason to ask for composite device is that i attempted this long time back (>6yrs back) and i was facing some problem due to lack of support in Windows OS. I remember something was mentioned on Microsoft site. Now, the Windows OS support the composite but we need to make Mass-storage the 1st interface. This is what i am able to recall...2011-07-18 08:03 AM
Your mods are almost fine.
Did you modify EP_NUM macro value, too? inc\usb_conf.h #define EP_NUM (4) // <--- 7 (max EP number + 1, for EP0) Tsuneo2011-07-18 10:09 AM
Did you modify EP_NUM macro value, too?
inc\usb_conf.h
#define EP_NUM (4) // <--- 7 (max EP number + 1, for EP0)
Tsuneo
No, I did not, and... YES, THAT WAS IT! Now it started working as soon as I changed EP_NUM to 7!
I assumed, EP_NUM is the number of endpoints actually in use, not the number of last used endpoint, and left it unchanged... Thanks! Meanwhile I am not sure if I should use ST FS USB library or better switch to KEIL RL-USB along with its ''Drivers'' for STM32F10x... KEIL has a pretty nice help file and examples to its RL-USB (as well as for other RL- parts), also with the explanations, how to build a composite device, what I miss now in ST USB examples/UM0424. What is your opinion? P.S. Are you that Tsuneo, who made also a lot of well known examples for USB implementation on Silabs F340?
2011-07-18 10:15 AM
''Was it a killer question? ''
Sorry, i wasnt getting time to visit the forum due to my current assignments.
Sorry, I did not mean you personally or your answer. I saw a view counter of my posting growing but missed any answer and became impatient, so my ''killer question'' was a kind of unaddressed rhetorical exclaim.
2011-07-18 11:59 AM
> What is your opinion?
For development of a composite device, Keil's USB stack is much easier than ST's. Keil's stack is organized for this purpose. Just a couple of clicks on the configuration dialog makes it. http://www.keil.com/support/man/docs/rlarm/rlarm_usb_create_compo.htm ST's stack is designed for single class. Of course, You may make a composite device on ST's, but you have to modify a fair amount of lines on the source code.> P.S. Are you that Tsuneo, who made also a lot of well known examples for USB implementation on Silabs F340? Thanks. I've posted to many fora on USB, SiLabs, Microchip, Keil, LPC2000, Freescale, TI MSP430, Axelson's, and here. I'm on vacation, now :) Tsuneo2011-07-19 01:18 AM
Nice to meet you here, Tsuneo!
> For development of a composite device, Keil's USB stack is much easier than ST's.
> Keil's stack is organized for this purpose. Just a couple of clicks on the configuration
> dialog makes it. Yesterday I was fighting with KEIL USB stack and noticed, it needs - at least for the CDC - synchronous calls to push the whole engine (see
http://www.keil.com/support/man/docs/rlarm/rlarm_usb_create_cdc.htm
). ST USB stack seems to be fully and nice interrupt driven, instead (''init and forget''). Igor.