Changing from USB Host to Client from within CE

Oct 3, 2008 at 9:37 PM
Does anyone know if there is a way to change from USB Host to Client Mode from within CE? I know it is possible to change modes via the Hardware Word in the boot loader but was looking for ideas as to if it is possible from within CE via a small app. This feature is used on  some smart phones so I believe it must be possible.

Oct 3, 2008 at 10:04 PM
Yea, its possible but I would be carefull about flipping it on the fly.
The USB Host and Device are two seperate modules and can both be enabled and clocked at the same time.
There is an internal multiplexer that controls the routing of the D+ and D- pins to the correct module.

The register is named UP2OCR. If you read the PXA270 manual you will see it.

The problem is the drivers. Both the client and host drivers are native in the image but only one loads based on how the hardware word is set.
You would have to modify both drivers which is not possible with the binary BSP version.

I have had better luck using the USB Host pin out from the small connector on the motherboard and leave the default USB connection configured for client (Device).
That is if what you are doing needs both a Host and Client.
The BSP supports USB 1 Host and USB 2 in Host or Client modes.

Oct 5, 2008 at 10:08 PM
Great advise. I will use the USB Host pinout from the small connector on the motherboard.
This will also allow me to use a standard A receptacle.