Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
12 years, 1 month ago.
USB CDC-MSC Composite Device
I try this example without sucess. The first time I install the cdc driver it works. But, as soon I cancel the virtual disk verification in windows, the virtual port com doesn't work any more. In this case, the MBED receive char from the PC, but when I try to send a char from the MBED (cdcmsc.putc(c);), the USBDevice::write(...) function block the program and I receive nothing.
6 Answers
12 years, 1 month ago.
Hi Jean-Roch,
You can checkout the last version of the USBDevice library. The problem of dynamic allocation should be fixed.
Concerning the composite device problem, I am not surprised to hear that it works with Linux. Apparently, on Windows, some people are using a proprietary driver to have something reliable (section "Using CDC ACM + MS device with Windows 7 host" of https://www.ridgerun.com/developer/wiki/index.php/How_to_use_USB_CDC_ACM_and_MS_composite_Linux_gadget_driver).
Cheers, Sam
12 years, 1 month ago.
Hi Jean-Roch,
Nice to see people using USB composite devices.
Do you have this problem if you are using the USBSerial class (not a composite device) ?
Which version of Windows are you using ?
What do you mean by "cancelling the virtual disk verification" ? Out of curiosity, do you have this problem if you call directly:
cdcacm._putc(c);
Cheers, Sam
12 years, 1 month ago.
Hi Sam
USBSerial works fine alone. The disk verification is proposed by windows the first time to check errors. In fact, as soon window access to disk, virtual com stop working (mbed->PC). If I disable the mass storage device in Windows, the port com works again.
It seems that the composite device works with a Linux PC. I try the _putc() function directly : same issue
More, I have strange behaviour when use dynamic allocation of USB object (use of new)
12 years, 1 month ago.
Hi Sam
Thanks a lot for the update... The dynamic allocation works perfectly.
For the composite device, the driver from Thesycon works... what about the driver from Mbed (The MBED is a composite device isn't it ?)
12 years, 1 month ago.
Hi Jean-Roch,
Yes the mbed is a composite device and there is a specific driver that you have to install.
Cheers, Sam
12 years, 1 month ago.
Sam,
Is there a way to use the Mbeb driver with a custom USB Composite device ?