Pins 31, 32 USB. Can I use them for USB serial-to-windows

12 Nov 2011

I'd like to use them as described so I can plug in a usb cable to my mbed project. I have a USB connector on my project case which I want to use for a USB memory stick. Also, not at the same time, I want to attach a USB cable to the same connector for a USB serial connection to pc.

13 Nov 2011

Hello, for access to usb flash disk you will need mbed acting as USB host. More about USB Host for flash disks is here http://mbed.org/users/peterbarrett1967/notebook/blueusb---bluetooth-and-usb-host-controller-for-mb/ this is USB host for USB devices like HID, hubs, MSC... And here http://mbed.org/users/igorsk/notebook/interfacing-usb-mass-storage-devices-aka-usb-flash/.

For using mbed in USB host mode, You also need to pull-down these D+ and D- pins to ground with 15K resistor each. This is mentoied in blueUSB wiki page. Vusb and Ground pins need to be connected to USB connector too to power flash disk.

To use mbed for serial communication via these USB pins and not via installed mini B USB socket I think You can use this http://mbed.org/users/okini3939/programs/USB_CDC/m0ciep. But for using mbed as device via pins D+ and D- You must remove pull-down resistors if previously these pins was used to connect flashdisk.

If You use mbed in device mode You can use red wire in USB cable or socket to power mbed via Vin pin on mbed. As I understand for mbed in USB device mode this wire does not need to be connected if mbed powered via external power or from PC via mini USB B connector. But in host mode this wire have to be connected to Vusb (5V) pin as it is used as power for connected USB device.

As far as I know there are pins IF- and IF+ which corresponds (correct me if not) with pins used in mini USB B connector so you can connect mbed to PC via these pins if do not want to use mbeds mini USB B. I think this does the same as mbed connected via mini USB B.