Main Site Documentation

Cerb40 Pins PB14 and PB15


#1

What are pins PB14 USBHS DM and PB15 USBHS DP pins used for? Are they to allow a cerb to be seen as a USB device ?


#2

USB Host, you will have to write the firmware :wink:


#3

thats like asking me to paint the mona lisa with my toes!


#4

@ HughB - lol


#5

I think with little modification of firmware is possible to expose another USB port as client.
I haven’t test it from hardware side yet, but from software side is visible two USB ports.


#6

@ slawek - Interesting thanks for the info. Keep us posted on your progress.


#7

@ HughBHero

Now i can confirm that is possible to use second USB port at Cerberus firmware as client.
To enable second USB port is just enough in the file:


C:\MicroFrameworkPK_v4_2\Solutions\FEZCerberus\platform_selector.h 

change lines of the code.


 #define TOTAL_USB_CONTROLLER            2
 #define USB_MAX_QUEUES                  6  // 4 endpoints (EP0 + 3)

After compilation of the firmware on the NETMF side you will see two USB controllers.


UsbController[] controllers = UsbController.GetControllers();

For the testing I have used hardware created from the schematics of GHI’s USB Host.
I didn’t find the way how to initialize the second port at the firmware, but i found out that is possible to do in the managed code.

This article explains pretty much everything:

http://guruce.com/blogpost/communicating-with-your-microframework-application-over-usb

Once second port is initialized, NETMF stores configuration in the flash.
And next time initialization routine is not needed.

Of course would be the problem with WinUSB driver for windows.
Just for the testing i think is better assign some VID and PID other than GHI to stay away laler problems with debugging port.

Also i think needed some event handler to take care when device is plugged.
That can be controlled on PB13 pin.

Please consider that code as just proof of concept.
Good luck. :slight_smile:

P.S.
Seems that for WinUSB driver other VID and PID is not enough. WinUSB enumerate USB devices by GUID.